Fix locale on Android
This commit is contained in:
@@ -164,6 +164,9 @@ void LocalizationService::OnLocalizationChanged()
|
||||
Instance.LocalizedStringTables.Add(table->Get(), table->Count());
|
||||
}
|
||||
|
||||
#if PLATFORM_ANDROID
|
||||
// Android doesn't support locales in the native C library (https://issuetracker.google.com/issues/36974962)
|
||||
#else
|
||||
// Change C++ locale (eg. used by fmt lib for values formatting)
|
||||
{
|
||||
char localeName[100];
|
||||
@@ -188,6 +191,7 @@ void LocalizationService::OnLocalizationChanged()
|
||||
}
|
||||
std::locale::global(std::locale(localeName));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Send event
|
||||
Localization::LocalizationChanged();
|
||||
|
||||
@@ -535,6 +535,7 @@ void JNICALL Java_com_flaxengine_GameActivity_nativeSetPlatformInfo(JNIEnv* env,
|
||||
DeviceBuildNumber = ToString(env, deviceBuildNumber);
|
||||
SystemVersion = ToString(env, systemVersion);
|
||||
SystemLanguage = ToString(env, systemLanguage);
|
||||
SystemLanguage.Replace('_', '-');
|
||||
ScreenWidth = screenWidth;
|
||||
ScreenHeight = screenHeight;
|
||||
CacheDir = ToString(env, cacheDir);
|
||||
|
||||
Reference in New Issue
Block a user