• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 * @devices tv, phone, tablet, wearable, liteWearable
18 */
19export interface LocaleResponse {
20  /**
21   * Current language of the application. Example: zh.
22   * @devices tv, phone, tablet, wearable, liteWearable
23   * @since 3
24   */
25  language: string;
26
27  /**
28   * Country or region. Example: CN.
29   * @devices tv, phone, tablet, wearable, liteWearable
30   * @since 3
31   */
32  countryOrRegion: string;
33
34  /**
35   * Text layout direction. Available values are as follows:
36   * ltr: The text direction is from left to right.
37   * rtl: The text direction is from right to left.
38   * @devices tv, phone, tablet, wearable, liteWearable
39   * @since 3
40   */
41  dir: "ltr" | "rtl";
42}
43
44/**
45 * @devices tv, phone, tablet, wearable, liteWearable
46 */
47export default class Configuration {
48  /**
49   * Obtains the current locale of the application, which is the same as the system locale.
50   * @devices tv, phone, tablet, wearable, liteWearable
51   */
52  static getLocale(): LocaleResponse;
53}
54