• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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 #ifndef OHOS_GLOBAL_I18N_I18N_TYPES_H
17 #define OHOS_GLOBAL_I18N_I18N_TYPES_H
18 
19 namespace OHOS {
20 namespace Global {
21 namespace I18n {
22 enum I18nErrorCode {
23     SUCCESS = 0,
24     FAILED = 1,
25     NO_PERMISSION = 2,
26     INCONSISTENT_DESCRIPTOR = 3,
27     INVALID_LANGUAGE_TAG = 4,
28     INVALID_REGION_TAG = 5,
29     INVALID_LOCALE_TAG = 6,
30     REMOVE_PREFERRED_LANGUAGE_FAILED = 7,
31     ADD_PREFERRED_LANGUAGE_NON_EXIST_FAILED = 8,
32     ADD_PREFERRED_LANGUAGE_EXIST_FAILED = 9,
33     UPDATE_LOCAL_DIGIT_FAILED = 10,
34     UPDATE_24_HOUR_CLOCK_FAILED = 11,
35     UPDATE_SYSTEM_LANGUAGE_FAILED = 12,
36     UPDATE_SYSTEM_LOCALE_FAILED = 13,
37     UPDATE_SYSTEM_PREFERRED_LANGUAGE_FAILED = 14,
38     PUBLISH_COMMON_EVENT_FAILED = 15,
39     LOAD_SA_FAILED = 16,
40     INVALID_24_HOUR_CLOCK_TAG = 17
41 };
42 
43 enum I18nNormalizerMode {
44     NFC = 1,
45     NFD,
46     NFKC,
47     NFKD
48 };
49 }
50 }
51 }
52 #endif