LEE
LEE

Reputation: 3605

Android localization at runtime example shows empty strings for languages other than English

I'm trying to implement Android Localization (currently for Hindi Language). I found this tutorial. However, there is a problem that I'm facing with it. When I click the Select Language option, I can see only English in the dropdown. The remaining two are invisible. Not quite sure as to what the issue could be.

enter image description here

enter image description here

Upvotes: 0

Views: 251

Answers (2)

LEE
LEE

Reputation: 3605

@felix's answer helped me to understand the root cause. Basically, the issue was that my emulator did not have Hindi language support. That's why it showed empty strings. However, when I ran the same app on my phone, which apparently does have the Hindi language support since I'm in India, it worked like a charm.

Upvotes: 0

felix
felix

Reputation: 111

The problem could be your used font missing hindi characters. There seems to be various similar questions on stackoverflow that might be related, perhaps they can help?.

Another option could possibly be the encoding, which you could change similar to (I don't know which is the default encoding though, or whether it already supports Hindi or not):

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="string_name">text_string</string>
</resources>

Upvotes: 1

Related Questions