Configure localization options
To test a localized version of your app, you can configure language, locale, and timezone settings on the device. To achieve this, you need to set the language
, locale
, or timezone
parameter in the builds REST API and start the Flutter test execution.
REST API endpoint:
POST /app-automate/flutter-integration-tests/v2/android/build
You can pass these parameters as a group or individually.
Xiaomi, Huawei, Oppo, and Vivo Android devices do not support the device timezone feature.
Parameter | Description | Values |
---|---|---|
language |
Set the language of the app. |
Example: ‘fr’ You can view the complete list of langauges on Wikipedia. |
locale |
Set the locale of your app. |
Example: CA Format: Country name abbreviation You can view the complete list of locale on Wikipedia. |
timezone |
Set timezone to configure tests to run on a custom time zone. |
Example: UTC New_York (for America/New_York) Los_Angeles (for America/Los_Angeles) La_Rioja (for America/Argentina/La_Rioja) You can view the complete list of timezones on Wikipedia. |
Example cURL
request to set all the parameters:
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/flutter-integration-tests/v2/android/build" \
-d '{"language":"fr","locale":"CA","timezone":"UTC","devices": ["Samsung Galaxy S9 Plus-9.0"], "app": "bs://0b5948a88c927fee4db8f07bd964e0f2030d3506", "testSuite": "bs://5f87c81caea6ce89ac453c77eb70d75e8e157f56"}' \
-H "Content-Type: application/json"
-
language
andlocale
change settings at an app level. -
To ensure application under test uses localized strings and displays dates, times, and calendar in an appropriate format, pass both
language
andlocale
in desired capabilities. -
BrowserStack’s paid plans offer access to timezone, language, and locale features. You can check the available paid plans here.
Related topics
-
Manage your uploaded apps using our REST API.
-
Use the recent apps API endpoint to list your recently uploaded apps.
-
Delete your uploaded apps using the delete app API endpoint.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!