When running tests on Android devices, you may encounter "Failed to change the specified language (XX) and region (YY)." error after specifying "Device Language" and "Device Region" in the test run settings.
Cause
MagicPod uses Appium internally to configure the language and region on Android devices. Appium validates whether the specified combination of language and region is defined in the ICU
(International Components for Unicode) specification. If an undefined combination is specified, this error occurs.
For example, Japanese (ja) only has Japan (JP) defined as a valid region, so a combination like ja × US (United States) will result in an error. Similarly, English (en) has many valid regions
defined, but en × JP (Japan) is not among them.
Supported language and region combinations
The supported combinations depend on the Android OS version and the ICU library version installed on the device. Therefore, it is difficult to provide a comprehensive list that applies to all
environments. However, the following general rule applies:
- A combination is supported when the region is a country/territory where the language is actually used
- Examples: Japanese × Japan (ja_JP), English × United States (en_US), French × France (fr_FR)
Examples of commonly used combinations
| Language | Supported regions (examples) |
| Japanese (ja) | Japan (JP) |
| English (en) | United States (US), United Kingdom (GB), Australia (AU), Canada (CA), India (IN), and many more |
| French (fr) | France (FR), Canada (CA), Belgium (BE), Switzerland (CH), etc. |
| German (de) | Germany (DE), Austria (AT), Switzerland (CH), etc. |
| Chinese (zh) | China (CN), Taiwan (TW), etc. |
| Korean (ko) | South Korea (KR) |
| Spanish (es) | Spain (ES), Mexico (MX), Argentina (AR), United States (US), and many more |
For a more precise list, refer to the ICU project specification.
Resolution
If you encounter this error, change the language and region combination in the test run settings to a supported combination as described above.