> - The APIs of this module are no longer maintained since API version 7. It is recommended that you use [`@ohos.i18n`](js-apis-i18n.md) and [`@ohos.intl`](js-apis-intl.md) instead.
> - The APIs of this module are no longer maintained since API version 7. It is recommended that you use [`@ohos.i18n`](js-apis-i18n.md) and [`@ohos.intl`](js-apis-intl.md) instead.
>
>
>
>
...
@@ -17,29 +17,38 @@ import configuration from '@system.configuration';
...
@@ -17,29 +17,38 @@ import configuration from '@system.configuration';
## configuration.getLocale
## configuration.getLocale
getLocale(): <LocaleResponse>
getLocale(): LocaleResponse
Obtains the current locale of the application, which is the same as the system locale.
Obtains the current locale of the application, which is the same as the system locale.
| language | string | Yes | No | Language, for example, **zh**.|
| countryOrRegion | string | Yes | No | Country or region, for example, **CN** or **US**.|
| dir | string | Yes | No | Text layout direction. The value can be:<br>- **ltr**: from left to right<br>- **rtl**: from right to left|
| unicodeSetting<sup>5+</sup> | string | Yes | No | Unicode language key set determined by the locale. If current locale does not have a specific key set, an empty set is returned.<br>For example, **{"nu":"arab"}** indicates that current locale uses Arabic numerals.|