9

I would like to set my emulator locale to some custom locale for Indian regional languages like Tamil or Kanada or telugu. Any one plz give suggestions, Thanks in Advance.

Ganesh K
  • 2,623
  • 9
  • 51
  • 78
  • you want support multiple language for your application? or totally change android phone language? – Dinesh Jun 08 '12 at 06:38
  • 2
    @Dinesh I want to support kanada language in my app. – Ganesh K Jun 08 '12 at 06:40
  • @dinesh I want to change the locale in my phone similar to https://android.stackexchange.com/questions/20599/ but without the need of https://play.google.com/store/apps/details?id=com.bruce.setlocale – Raj Oct 28 '19 at 20:07

2 Answers2

4

you must download your language font file(.ttf). after,import font file in your project assets folder create folder fonts and paste your font file(.ttf) to folder fonts. after following instructions in below link for stack overflow post :

Android Tamil font between english word

(or)

Refer this document

http://developer.android.com/training/basics/supporting-devices/languages.html

iso code for all languages link below

http://www.w3.org/WAI/ER/IG/ert/iso639.htm

Welcome...!

Community
  • 1
  • 1
Dinesh
  • 6,500
  • 10
  • 42
  • 77
  • @Tx for Quick response. Does it work for Android 2.2 version? – Ganesh K Jun 08 '12 at 06:47
  • After going through links given by you what i understood is you are suggesting me to use 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"); something like that, right. This I have to do for every Text view or button, where ever I want. But I want something that android system it self look up the strings defined in resource files. Tx for u r efforts. – Ganesh K Jun 08 '12 at 07:12
  • yeah something like res/values-kn – Ganesh K Jun 08 '12 at 07:17
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/12290/discussion-between-vrs-and-dinesh) – Ganesh K Jun 08 '12 at 07:20
3

It is my fault not clearly understanding android documentation link given below http://developer.android.com/guide/topics/resources/localization.html

For others sake,

Creating and using a custom locale is for developers to test localization apps in android emulator.There are two ways to create custom locale for more see above link.

* Use the Custom Locale application, which is accessible from the Application tab. (After you create a custom locale, switch to it by pressing and holding the locale name.) In my case I given te_IN for telugu(Indian) locale. 
* Change to a custom locale from the adb shell

I am just confused by checking custom locale app in device.

Also, Right now there is no default locale support for Indian regional languages except for Hindi, for which code is hi_IN, that too in Android 4.0.3. So even though we set Custom locale to telugu Indian i.e te_IN, Android system will not identify telugu fonts. Any suggestions on this? I want this on Android 2.2 version.

Ganesh K
  • 2,623
  • 9
  • 51
  • 78