1/* 2 * Copyright (c) 2020 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @syscap SystemCapability.ArkUI.ArkUI.Lite 18 * @since 3 19 */ 20export interface LocaleResponse { 21 /** 22 * Current language of the application. Example: zh. 23 * @syscap SystemCapability.ArkUI.ArkUI.Lite 24 * @since 3 25 */ 26 language: string; 27 28 /** 29 * Country or region. Example: CN. 30 * @syscap SystemCapability.ArkUI.ArkUI.Lite 31 * @since 3 32 */ 33 countryOrRegion: string; 34 35 /** 36 * Text layout direction. Available values are as follows: 37 * ltr: The text direction is from left to right. 38 * rtl: The text direction is from right to left. 39 * @syscap SystemCapability.ArkUI.ArkUI.Lite 40 * @since 3 41 */ 42 dir: "ltr" | "rtl"; 43} 44 45/** 46 * @syscap SystemCapability.ArkUI.ArkUI.Lite 47 * @since 3 48 */ 49export default class Configuration { 50 /** 51 * Obtains the current locale of the application, which is the same as the system locale. 52 * @syscap SystemCapability.ArkUI.ArkUI.Lite 53 * @since 3 54 */ 55 static getLocale(): LocaleResponse; 56} 57