1# @system.configuration (Application Configuration)
2
3> **NOTE**
4> - The APIs of this module are deprecated since API version 7. You are advised to use [@ohos.i18n](../apis-localization-kit/js-apis-i18n.md) and [@ohos.intl](../apis-localization-kit/js-apis-intl.md) instead.
5>
6>
7> - The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8
9
10## Modules to Import
11
12
13```ts
14import Configuration from '@system.configuration';
15```
16
17
18## configuration.getLocale
19
20static getLocale(): LocaleResponse
21
22Obtains the current locale of the application, which is the same as the system locale.
23
24**Atomic service API**: This API can be used in atomic services since API version 12.
25
26**System capability**: SystemCapability.ArkUI.ArkUI.Lite
27
28**Return value**
29| Type           | Description           |
30| -------------- | ------------- |
31| LocaleResponse | Current locale information. |
32
33**Example**
34  ```
35  export default {
36    getLocale() {
37      const localeInfo = configuration.getLocale();
38      console.info(localeInfo.language);
39    }
40  }
41  ```
42
43
44## LocaleResponse
45
46Defines attributes of the current locale.
47
48**Atomic service API**: This API can be used in atomic services since API version 12.
49
50**System capability**: SystemCapability.ArkUI.ArkUI.Lite
51
52| Name  | Type  | Readable  | Writable  | Description                                      |
53| ---- | ------ | ---- | ---- | ---------------------------------------- |
54| language | string | Yes   | No   | Language, for example, **zh**. |
55| countryOrRegion | string | Yes   | No   | Country or region, for example, **CN** or **US**. |
56| dir | string | Yes   | No   | Text layout direction. The value can be:<br>- **ltr**: from left to right<br>- **rtl**: from right to left |
57