How to setup localization for Android with Katalon


#1

I found 2 ways to do that:

  1. From Katalon Studio:
    • Select Project > Settings > Desired Capacities > Mobile > Android
    • Add 2 properties language and locale with the values vi and VN (for example of Vietnamese)
      You can refer here to have the list of languages.

localazition

  1. Or we can use the RunConfiguration library and add the below code to our script.

    import com.kms.katalon.core.configuration.RunConfiguration

    RunConfiguration.setMobileDriverPreferencesProperty("language", 'vi')
    RunConfiguration.setMobileDriverPreferencesProperty("locale", 'VN')

    Mobile.startApplication(appPath, false)

  • Remember to put those configs before the app starts (Mobile.startApplication).

#2

@tuanguyen I updated the category to Tips and Tricks.


#3

Thanks @manpreet.mukkar!