Android – Testing Localization

In the last post, we have made an application with localization: Android – Localization

So now we have to test it. Unfortunately, the locale in the android phone is already preset in the factory and u cannot change it. so the only way to test the localization is to use the emulator.

After starting the emulator, there is an option Custom Locale in the menu. Open it.

Custom Locale in Emulator
Custom Locale in Emulator

Choose your locale by long press. Then click apply.

Restart the emulator either by

  • Close the emulator and run your application again
  • Open the command prompt
    >adb shell
    # setprop persist.sys.language <Language Code>;setprop persist.sys.country <Region Code>;stop;sleep 5;start

Now you can change the locale of the emulator to test your application localization.
Done =)

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.