---
title: Set localization options with Espresso
description: 'Android Espresso Testing: change localization settings on Android. Set
  a locale, language and timezone with Espresso.'
source_url:
  html: https://testingbot.com/support/app-automate/espresso/set-localization-options
  md: https://testingbot.com/support/app-automate/espresso/set-localization-options/index.md
---
# Set localization options

With TestingBot you can run Android Espresso tests on a localized version of your Android app.   
 You can configure the language, locale and timezone of the remote device before running an Android Espresso test.

## Setting Language for Android Espresso Tests

You can test a localized version of your app with Android Espresso, by changing the language of the application under test.   
 You will need to specify a `language` option with the ISO code of the language you want to use.

[CLI](https://testingbot.com#)[cURL](https://testingbot.com#)

    testingbot espresso app.apk app-test.apk \
      --device "Pixel 6" \
      --platform-version "12" \
      --language "fr"

Use an [ISO 639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) to set the language of your app.   
 Your app needs to be compiled with support for this language to notice a change.

    curl -u api_key:api_secret \
    -X POST "https://api.testingbot.com/v1/app-automate/espresso/:id/run" \
    -d '{ "espressoOptions": { "language": "fr" }, "capabilities":[{"platform":"ANDROID", "version":12, "deviceName":"Pixel 6", "platformName":"Android"}]}' \
    -H "Content-Type: application/json"

Use an [ISO 639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) to set the language of your app.   
 Your app needs to be compiled with support for this language to notice a change.

## Set a locale for Android Espresso Testing

It is possible to set a locale, different than the default device's locale, with the `locale` parameter.

Please use the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. For example: `DE` for Germany.

[CLI](https://testingbot.com#)[cURL](https://testingbot.com#)

    testingbot espresso app.apk app-test.apk \
      --device "Pixel 6" \
      --platform-version "12" \
      --locale "DE"

    curl -u api_key:api_secret \
    -X POST "https://api.testingbot.com/v1/app-automate/espresso/:id/run" \
    -d '{ "espressoOptions": { "locale": "DE" }, "capabilities":[{"version":"12", "deviceName":"Pixel 6", "platformName":"Android"}]}' \
    -H "Content-Type: application/json"

## Change timezone for Android Espresso

It might be necessary during your tests to change the timezone to a different timezone than the default one on the device (UTC).

Please use a timezone format from the [list of timezones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

[CLI](https://testingbot.com#)[cURL](https://testingbot.com#)

    testingbot espresso app.apk app-test.apk \
      --device "Pixel 6" \
      --platform-version "12" \
      --timezone "America/New_York"

    curl -u api_key:api_secret \
    -X POST "https://api.testingbot.com/v1/app-automate/espresso/:id/run" \
    -d '{ "espressoOptions": { "timeZone": "America/New_York" }, "capabilities":[{"version":"12", "deviceName":"Pixel 6", "platformName":"Android"}]}' \
    -H "Content-Type: application/json"

### Looking for more help?

Have questions or need more information? Reach out via email or Slack.

[Email us](https://testingbot.com/contact/new)[Slack Join our Slack](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
