Author Topic: Localisation in Hindi?  (Read 4993 times)

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Localisation in Hindi?
« 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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Localisation in Hindi?
« Reply #1 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.

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Re: Localisation in Hindi?
« Reply #2 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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Localisation in Hindi?
« Reply #3 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?

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Re: Localisation in Hindi?
« Reply #4 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!