android - Specifying resource qualifier -


my app being developed region users have english default language. however, app allows user choose local language. since user not setting device's overall language, default string resources called. possible resource specific qualifier e.g. values-myqualifier/strings.xml?

if want set diffrent locale application can use following code:

locale locale = new locale(countycode); locale.setdefault(locale); configuration config = new configuration(); config.locale = locale; getbasecontext().getresources().updateconfiguration(config,         getbasecontext().getresources().getdisplaymetrics());  oncreate(null); 

check resourcebundle


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -