UNPKG

io.appium.settings

Version:
26 lines 1.65 kB
import type { SettingsApp } from '../client'; import type { SupportedLocale } from './types'; /** * Set the locale name of the device under test. * Don't need to reboot the device after changing the locale. * This method sets an arbitrary locale following: * https://developer.android.com/reference/java/util/Locale.html * https://developer.android.com/reference/java/util/Locale.html#Locale(java.lang.String,%20java.lang.String) * * @param language - Language. The language field is case insensitive, but Locale always canonicalizes to lower case. * format: [a-zA-Z]{2,8}. e.g. en, ja : https://developer.android.com/reference/java/util/Locale.html * @param country - Country. The country (region) field is case insensitive, but Locale always canonicalizes to upper case. * format: [a-zA-Z]{2} | [0-9]{3}. e.g. US, JP : https://developer.android.com/reference/java/util/Locale.html * @param script - Script. The script field is case insensitive but Locale always canonicalizes to title case. * format: [a-zA-Z]{4}. e.g. Hans in zh-Hans-CN : https://developer.android.com/reference/java/util/Locale.html * @throws {Error} If language or country name is not provided */ export declare function setDeviceLocale(this: SettingsApp, language: string, country: string, script?: string | null): Promise<void>; /** * Retrieves the list of supported device locales * * @returns List of supported locales * @throws {Error} If the list cannot be retrieved */ export declare function listSupportedLocales(this: SettingsApp): Promise<SupportedLocale[]>; //# sourceMappingURL=locale.d.ts.map