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
Post a Comment