views:

228

answers:

3

hello everyone:

by default,the android system's default location is US and language is en. but i want to set the default location to other country.so, the users will see their mother language when the first time start up android.

i have tried to modify the code(/dalvik/libcore/luni/src/main/java/java/util/Locale.java),changed the locale's default value.but,no use.

can you tell me how to set the default location?

thank you very very much!

*I want to make an android image,then burn it to device,when the android start up the first time, i want it's os language is not english but other language.

A: 

hi aooray,

you can do it whatever you want to set country's local language/country/variant info..

U can use java.util.locale

and use method getISOcounty, getISOLanguage etc... very easy..

to know more in detail go through http://developer.android.com/reference/java/util/Locale.html

it will help u..

Does it answer your question? need any help feel free to post..

Thanks Rakesh

Rakesh Gondaliya
This is not really what he has asked for. He is basically trying to create his custom ROM with a custom default locale like WarrenFaith already mentioned.
Octavian Damiean
thanks for your reply.actually, i just want to modified the default value of locale.not by calling an method.that means:what i want is if no one has changed the locale, the default locale is not US but the locale which i want.
aooray
A: 

Have you already checked out this part?

 private Locale() {
   languageCode = "en"; //$NON-NLS-1$
   countryCode = "US"; //$NON-NLS-1$
   variantCode = ""; //$NON-NLS-1$
 }

It starts at line 212 in Locale.java. Is this the part where you've set your default values? If so then please post that bit up so I can check it out.

EDIT: Actually if you can post your whole Locale.java up on Pastebin. http://pastebin.com/

Octavian Damiean
yes , i have modified it .i have uploaded the Locale.java. http://pastebin.com/VF5zyktq
aooray
Odd you've done what I would've done. I will try to find a solution but this might take some time.
Octavian Damiean
A: 

thanks for all you reply.

i have found the method to change the default language.

just modify the file(build/core/Makefile).

set PRODUCT_DEFAULT_LANGUAGE and PRODUCT_DEFAULT_REGION to what you want to set.

aooray