I am trying to implement my app in different languages. Text changes are fine but i didn’t get any idea of that images are retrieving with respect to selection of locale(custom).
i follow the below code:
My string are put in resource folder: res/values-xx /string.xml
Locale locale=new Locale("xx");
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
getBaseContext().getResources().updateConfiguration(config,getBaseContext().getResources().getDisplayMetrics());
This is working fine for text. Let me know how to implement this. I just tried to put images in res/drawable-xx/some.png ,but it doesn’t working for me. Please give me some suggestions..
Yes Finally i got the solution for it.Here xx is Language code.
This is very simple by declaring layout as layout-xx and your drawable folder should be declared as drwable-xx.