Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Shifty Geezer on July 20, 2014, 02:15:06 PM

Title: Localisation in Hindi?
Post by: Shifty Geezer on July 20, 2014, 02:15:06 PM
Localisation works gorgeously with non-Latin fonts like Chinese and Russian. However, when I load a localisation.txt file up with Hindi, text labels using UILocalize appear empty. How do I use UILocalise with Hindi and such?
Title: Re: Localisation in Hindi?
Post by: ArenMook on July 20, 2014, 06:34:46 PM
Localization.txt needs to be saved as UTF-8, and the font you're using must have the glyphs you're trying to draw. The fonts that come with NGUI don't have those glyphs.
Title: Re: Localisation in Hindi?
Post by: Shifty Geezer on July 21, 2014, 03:44:43 AM
I've imported the fonts as resources and set the appropriate font to the selected language. Localisation.txt is edited and saved in Mono and shows the Hindi characters.

If I just try adding ौसिखिया to a label using one of these fonts...
http://indiatyping.com/index.php/download/95-hindi-font-krutidev

..pasting the  ौसिखिया in Unity's inspector box enters nothing, but the number of triangles increases in the scene as if empty glyphs are being added.

Typing abc's in the label text field produces Hindi characters in the UI label, so it looks like a mapping issue.
Title: Re: Localisation in Hindi?
Post by: ArenMook on July 21, 2014, 05:22:54 PM
Try using the Font Maker to create a bitmap font rather than relying on dynamic fonts. However, in the dynamic font case all NGUI does is requests those characters from Unity. Did you see if they actually even get added to the font's texture when you type?
Title: Re: Localisation in Hindi?
Post by: Shifty Geezer on July 24, 2014, 08:45:21 AM
I'll look into using a localisation plugin from the asset store which also support RtoL text. It's only 15 bucks or so and will solve a lot of headaches in the long run!