mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-30 20:15:38 +00:00
(Android) Added localization support
This commit is contained in:
parent
302305b3ee
commit
63729cce19
|
@ -498,6 +498,7 @@ elseif(ANDROID)
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/external/ffmpeg-kit/src/ffmpeg
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/freeimage/FreeImage/Source
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/gettext/gettext-runtime/intl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/libgit2/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/pugixml/src
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/external/SDL_Android)
|
||||
|
@ -580,6 +581,7 @@ elseif(ANDROID)
|
|||
${PROJECT_SOURCE_DIR}/android/libs/${ANDROID_CPU_ARCH}/libfreeimage.so
|
||||
${PROJECT_SOURCE_DIR}/android/libs/${ANDROID_CPU_ARCH}/libfreetype.so
|
||||
${PROJECT_SOURCE_DIR}/android/libs/${ANDROID_CPU_ARCH}/libgit2.so
|
||||
${PROJECT_SOURCE_DIR}/android/libs/${ANDROID_CPU_ARCH}/libintl.so
|
||||
${PROJECT_SOURCE_DIR}/android/libs/${ANDROID_CPU_ARCH}/libjpeg.so
|
||||
${PROJECT_SOURCE_DIR}/android/libs/${ANDROID_CPU_ARCH}/libpoppler.so
|
||||
${PROJECT_SOURCE_DIR}/android/libs/${ANDROID_CPU_ARCH}/libpugixml.a
|
||||
|
|
|
@ -70,8 +70,13 @@ namespace Utils
|
|||
}
|
||||
|
||||
// No need to perform translations if we're using the default language.
|
||||
if (locale == "en_US")
|
||||
if (locale == "en_US") {
|
||||
setenv("LANGUAGE", locale.c_str(), 1);
|
||||
setenv("LANG", locale.c_str(), 1);
|
||||
setlocale(LC_MESSAGES, std::string {locale + ".UTF-8"}.c_str());
|
||||
textdomain(locale.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
std::string localePath;
|
||||
localePath.append("/")
|
||||
|
@ -97,6 +102,7 @@ namespace Utils
|
|||
SetThreadLocale(localeID);
|
||||
#else
|
||||
setenv("LANGUAGE", locale.c_str(), 1);
|
||||
setenv("LANG", locale.c_str(), 1);
|
||||
setlocale(LC_MESSAGES, std::string {locale + ".UTF-8"}.c_str());
|
||||
#endif
|
||||
textdomain(locale.c_str());
|
||||
|
|
Loading…
Reference in a new issue