0

I want to test localization in Indian language in Android. Following is the file string.xml in values folder

<string name="app_name">नमस्ते</string>   
<string name="text_a">परिक्षण</string>

I am using AndroidHindi.ttf font.

I want to display the particular text in hindi in adnroid , but while running I am getting unrendered text .

which particular library should I include to display it properly.

Cœur
  • 37,241
  • 25
  • 195
  • 267
drichirich
  • 3
  • 1
  • 5

1 Answers1

1

you must download your language font file(.ttf) and put in asset folder.

Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/Akshar.ttf");               
TextView tv = (TextView) findViewById(R.id.CustomFontText);
tv.setTypeface(tf);
tv.setText("Seasonal messages like welcome (நல்வரவு) is used in Kolam. Volunteering to draw kolam at temple is sometimes done when a devotee's");

Source

Community
  • 1
  • 1
Umar Mansuri
  • 127
  • 1
  • 14