salah Alhaddabi
salah Alhaddabi

Reputation: 79

Codename One: How to localize styled components

I am trying to add an Arabic bundle using this code:

    resourceBudle = new HashMap<String, String>();
    resourceBudle.put("Ok", "موافق");
    resourceBudle.put("@rtl", "true");
    resourceBudle.put("MainTitle", "عربتي");
    UIManager.getInstance().setBundle(resourceBudle);

Now the MainTitle is a label which I have styled using a UIID in the theme designer. I have set font to large and alignment to center. Now when I try to create a form with a toolbar and set the titlecomponent of the tolbar to this label I dont get the Arabix text. Instead I get for each character a box with "X" inside it. It looks like there is an encoding issue but I am not sure why. Can You please help??!!

Upvotes: 1

Views: 60

Answers (1)

salah Alhaddabi
salah Alhaddabi

Reputation: 79

Ok Sorry i think the problem was with the system font that I used. I had to change the font to monospace for example or any other font that supports Arabic.

Thanks.

Upvotes: 1

Related Questions