RTL auto-fix not working in scripts?

More
4 years 3 months ago #489 by AhoyThere
The RTL auto-fix works when I attach the Localize component to a gameobject that has an NGUI label just fine.

However, when I try to get a translation string for a RTL language (such as Arabic) in my scripts (using I2.Loc.ScriptLocalization.Get() ), the string that's returned isn't the fixed translation string. Is it supposed to be? If not, what is the best way to get the fixed RTL string when you're in a script?

Thanks for any help.

Please Log in or Create an account to join the conversation.

More
4 years 3 months ago #490 by Frank
You are right, only the Localize component modifies the string to account for RTL languages. I will make the new version to include a fix for this.

Here is a workaround while I make the new version and test it a bit:
string text = I2.Loc.ScriptLocalization.Get(xxxx);

if (LocalizationManager.IsRight2Left)   // is current language RTL
	text = ArabicSupport.ArabicFixer.Fix(text);

Thanks,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
4 years 3 months ago #491 by AhoyThere
Got it. Thanks for the quick reply!

Please Log in or Create an account to join the conversation.

Time to create page: 0.129 seconds
Template by JoomlaShine