In my application has language selection option either english or arabic. if user selects the english the application static text will be in english , if user selects the arabic the hole application text will be in arabic.
i have tried see my below code
`Configuration configuration = new Configuration();
switch(view.getId())
{
case R.id.language_arabic:
configuration.locale = Locale.getDefault(). here is my doubt(what the code will come here)
break;
case R.id.language_english:
configuration.locale = Locale.ENGLISH;
break;
default:
}
getResources().updateConfiguration(configuration, null);`
FOR english locale has the option to select the locale.english . but how can i choose the arabic language.
i have created two values folder for arabic values-ar in that i have string.xml files with arabic values. how can i call this can any one help
0 comments:
Post a Comment