• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 #ifndef OHOS_GLOBAL_I18N_LOCALE_CONFIG_EXT_H
16 #define OHOS_GLOBAL_I18N_LOCALE_CONFIG_EXT_H
17 
18 #include <string>
19 #include "i18n_types.h"
20 #include "unicode/locid.h"
21 #include "unicode/calendar.h"
22 #include "unicode/utypes.h"
23 
24 namespace OHOS {
25 namespace Global {
26 namespace I18n {
27 class LocaleConfigExt {
28 public:
29     static icu::Locale GetIcuLocale(const std::string& localeTag);
30     static std::unordered_map<icu::Calendar::EDaysOfWeek, WeekDay> GetDaysOfWeekMap();
31 
32 private:
33     static icu::Locale GetSystemIcuLocale();
34 
35     static std::unordered_map<icu::Calendar::EDaysOfWeek, WeekDay> eDaysOfWeekToWeekDay;
36 };
37 } // namespace I18n
38 } // namespace Global
39 } // namespace OHOS
40 #endif
41