mirror of
https://gitee.com/openharmony/global_i18n
synced 2024-11-27 17:21:23 +00:00
commit
9ecf4b82d0
@ -43,7 +43,8 @@ bool IsRTLCharacter(const std::string &character)
|
||||
{
|
||||
icu::UnicodeString unicodeString(character.c_str());
|
||||
UChar32 char32 = unicodeString.char32At(0);
|
||||
return u_hasBinaryProperty(char32, UCHAR_BIDI_MIRRORED);
|
||||
UCharDirection direction = u_charDirection(char32);
|
||||
return direction == UCharDirection::U_RIGHT_TO_LEFT;
|
||||
}
|
||||
|
||||
bool IsIdeoGraphic(const std::string &character)
|
||||
|
@ -26,7 +26,7 @@ namespace OHOS {
|
||||
namespace Global {
|
||||
namespace I18n {
|
||||
const char *PreferredLanguage::RESOURCE_PATH_HEAD = "/data/accounts/account_0/applications/";
|
||||
const char *PreferredLanguage::RESOURCE_PATH_TAILOR = "/resources.index";
|
||||
const char *PreferredLanguage::RESOURCE_PATH_TAILOR = "/assets/entry/resources.index";
|
||||
const char *PreferredLanguage::RESOURCE_PATH_SPLITOR = "/";
|
||||
const char *PreferredLanguage::PREFERRED_LANGUAGES = "persist.sys.preferredLanguages";
|
||||
static constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, 0xD001E00, "LocaleConfig" };
|
||||
@ -129,9 +129,9 @@ bool PreferredLanguage::RemovePreferredLanguage(int index)
|
||||
return false;
|
||||
}
|
||||
std::vector<std::string>::iterator it = preferredLanguageList.begin();
|
||||
preferredLanguageList.erase(it + index);
|
||||
preferredLanguageList.erase(it + idx);
|
||||
bool status = false;
|
||||
if (index == 0) {
|
||||
if (idx == 0) {
|
||||
status = LocaleConfig::SetSystemLanguage(preferredLanguageList[0]);
|
||||
if (!status) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user