Hi all,

I am developing application in which user can choose application
language. To achieve this, I am changing "Locale" as follows:
                Locale locale = new Locale("language code here");
                Locale.setDefault(locale);
                Configuration config = new Configuration();
                config.locale = locale;
                getBaseContext().getResources().updateConfiguration(config,
getResources().getDisplayMetrics());
and restart activity in following way:
 
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
                                        
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
. This helps to change languagein runtime.
However , option menu language does not change , in fact menu changes
if I close app completely and start again but does not change in
runtime. I even  have tried onPrepareOptionsMenu but it did not work?

What is the reason of this? or can you suggest me another possible
way?

Bests,

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to