How do I localize application so it uses specific locale regardless of what locale set on device? I want make it possible for users to set language of their choice.
So far I have code like this in my Application class:
@Override public void onCreate() { //Set locale String l = Preferences.getLocale(getApplicationContext()); if (!l.equals("")) { Locale locale = new Locale(l); Locale.setDefault(locale); Configuration config = getBaseContext().getResources().getConfiguration(); config.locale = locale; getBaseContext().getResources().updateConfiguration( config, getBaseContext().getResources().getDisplayMetrics()); } LogData.InsertMessage(getApplicationContext(), "Application started"); } Problem that I have is that it seems like I display in set locale just fine (TextViews) But Menu captions and toasts will fall to default locale.
Is there any 1-2-3 on how to get it working properly? I uses 2.2 version