listing all available languages in android apps -


i've been searching while couldn't find similar i'd need. i'd know how can list languages available in android application? , say, pick 1 of them run default.

just create preferences activity in application , display supporting languages within (may in list view check mark or something), when user selects specific language, save selected language preference in application shared preference. within every activity of application run conditional flow , use application's drawables , string values respect language selected in application preference.

edit
here example of localization http://www.icanlocalize.com/site/tutorials/android-application-localization-tutorial/ since don't want check selected language in phone's settings, in application's context, should create preferences activity specific application. here example of saving creating , using preferences : http://androidpartaker.wordpress.com/2010/07/11/android-preferences/

after doing that, run conditional flow in application's activities, example:

class myactivity extends activity { string key_selected_language = "selected_language"; oncreate(...) { if(getapplicationcontext().getsharedprefrences().getstring(key_selected_language,"").equalsignorecase("en"))  {   //change drawable/string values displayed in activity version of selected language.  } } 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -