Cannot get arab support working

More
4 years 5 months ago #4136 by pacogp
Hello, i just testing and searching how to make arab text looks fine.
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.

More
4 years 5 months ago - 4 years 5 months ago #4138 by pacogp
File Attachment:


this is how i need to look and how looks
Last edit: 4 years 5 months ago by pacogp.

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

More
4 years 5 months ago #4139 by pacogp
Ok, i think i have the solution.
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
Template by JoomlaShine