Cannot get arab support working

More
3 weeks 2 days 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
3 weeks 2 days ago - 3 weeks 2 days ago #4138 by pacogp
File Attachment:


this is how i need to look and how looks
Last edit: 3 weeks 2 days ago by pacogp.

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

More
3 weeks 1 day 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.139 seconds
Template by JoomlaShine