1

I have Just one Activity that i need it with a different locale. Example my Default App Local is English and i want to Open an Activity where it content is Arabic. how can i force this activity to read from the values-ar ?

user987760
  • 1,061
  • 3
  • 12
  • 26

1 Answers1

0

update the locale by using the below code and change the locale to your preferred one and restart the activity

 Configuration config = getBaseContext().getResources().getConfiguration();
    config.locale = Globals.locale;
    getBaseContext().getResources().updateConfiguration( config, null );
    Intent restart = getIntent();
    finish();
    startActivity( restart );
Ajay Venugopal
  • 1,544
  • 1
  • 17
  • 30