ShwetaK
ShwetaK

Reputation: 180

Use hindi in android

I want to create an android application in which the user should be able to select a language of his choice(English/ Hindi/ Marathi).

I have checked some android forums and found that android does not support Devanagari fonts.

Is there a solution? Also, is there a solution without rooting the device?

Upvotes: 3

Views: 2784

Answers (2)

Kri
Kri

Reputation: 1856

As Devanagari fonts are not supported by Android, you can still give that support to your Application.

For Hindi font copy font file (saral.ttf or Shusha.ttf or any font hindi file) to your asset folder. then use the following code.

 TextView text_view = new TextView(this);

 Typeface font = Typeface.createFromAsset(getAssets(), "saral.TTF");

 text_view.setTypeface(font);

 text_view.setText("हिंदी");

the same way u can give support for marathi....

Upvotes: 2

Related Questions