Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

14
  • 6
    I want to change the locale at runtime, in your code, you put your code before setContentView() method. So your code is not useful for me, So How to change the language at run time, In my application, there are two radio button, on for English and other one for Arabic , Commented Sep 14, 2012 at 5:48
  • 2
    @Buffalo, it's just the second argument for the Resources.updateConfiguration method. I've indented the code to make it more clear. Commented Feb 16, 2013 at 20:37
  • 7
    This is working well for all activities upon setting in the launching activity. But, the action bar title seems unaffected and still continues to display the default language. Any idea what I might have missed? Commented Oct 30, 2015 at 5:11
  • 11
    Config.locale is deprecated Commented Jul 19, 2017 at 15:43
  • 5
    instead of "config.locale = locale;" use "if (Build.VERSION.SDK_INT >= 17) { config.setLocale(locale); } else { config.locale = locale; } Commented Aug 25, 2018 at 12:47