Arabic with color code

More
8 years 5 months ago #1560 by messi
Arabic with color code was created by messi
I have a problem with arabic show

I assign the text use ScriptLocalization.Get() and the para FixForRTL is true

for example :

in google sheet it looks like this:


and in I2 language it looks like this :



but in game it looks like this :


what should I do to make the color code show right ?Thanks
Attachments:

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

More
8 years 5 months ago #1561 by Frank
Replied by Frank on topic Arabic with color code
Hi,
Sorry about this issue. I modified the RTL parsing code to keep tags in the right order and format.
Now, NGUI can have [xxxx],[-], etc and uGUI, TextMeshPro and others can use Ritch-Text tags <color=red>,</color>, etc

That change is in version 2.6.7 a1 which you can download from the beta folder.

Hope that helps,
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
8 years 5 months ago - 8 years 5 months ago #1563 by messi
Replied by messi on topic Arabic with color code
thank you very much,

what I use is 2.4.5 f3,in this version I found another wierd thing about Arabic translation.when I use {num} it will be parse as {num} but when I use {0} ,it will parse as {.}.

I encapsulate a function like this :

public static string GetWithPara( string Term, Dictionary<string, string> para, bool FixForRTL = true)
{
string _term = LocalizationManager.GetTermTranslation(Term, FixForRTL);

for (var s = para.GetEnumerator(); s.MoveNext();) {
string token = "{" + s.Current.Key + "}";
_term = _term.Replace(token, s.Current.Value);
}

return _term;
}

so I need the {0} keep the same as before,what should I do? Thank you
Last edit: 8 years 5 months ago by messi.

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

Time to create page: 0.313 seconds
Template by JoomlaShine