Cannot get arab support working
4 years 5 months ago #4136
by pacogp
Cannot get arab support working was created by pacogp
Hello, i just testing and searching how to make arab text looks fine.
I use this code:
Trying with text component and Textmeshprougui but no one looks fine.
What should i do? also imported arabic support plugin.
I use this code:
estaDescripcio = LocalizationManager.GetTranslation("DesBoxErich");
string porSiAcaso = "";
if (I2.Loc.LocalizationManager.CurrentLanguage == "Arabic")
{
LocalizationManager.TryGetTranslation("DesBoxErich", out porSiAcaso, FixForRTL: true);
ArabicFixer.Fix(porSiAcaso);
}
DescTienda.text = estaDescripcio;
Desc2.text = porSiAcaso;
Trying with text component and Textmeshprougui but no one looks fine.
What should i do? also imported arabic support plugin.
Please Log in or Create an account to join the conversation.
4 years 5 months ago - 4 years 5 months ago #4138
by pacogp
Replied by pacogp on topic Cannot get arab support working
Last edit: 4 years 5 months ago by pacogp.
Please Log in or Create an account to join the conversation.
4 years 5 months ago #4139
by pacogp
Replied by pacogp on topic Cannot get arab support working
Ok, i think i have the solution.
With RTMLPro asset, i can do that:
With RTMLPro asset, i can do that:
protected readonly FastStringBuilder finalText = new FastStringBuilder(RTLSupport.DefaultBufferSize);
public string GetFixedText(string input)
{
if (string.IsNullOrEmpty(input))
return input;
finalText.Clear();
RTLSupport.FixRTL(input, finalText, false, false, false);
finalText.Reverse();
return finalText.ToString();
}
void MyText(){
LocalizationManager.TryGetTranslation("DesBoxErich", out porSiAcaso, FixForRTL: false);
Desc2.text = GetFixedText(porSiAcaso);
}
Please Log in or Create an account to join the conversation.
Time to create page: 0.130 seconds