diff --git a/Source/Engine/Platform/Linux/LinuxPlatform.cpp b/Source/Engine/Platform/Linux/LinuxPlatform.cpp index 74d39df7e..f0339225a 100644 --- a/Source/Engine/Platform/Linux/LinuxPlatform.cpp +++ b/Source/Engine/Platform/Linux/LinuxPlatform.cpp @@ -2031,10 +2031,14 @@ bool LinuxPlatform::Init() char buffer[UNIX_APP_BUFF_SIZE]; // Get user locale string - const char* locale = setlocale(LC_ALL, NULL); + setlocale(LC_ALL, ""); + const char* locale = setlocale(LC_CTYPE, NULL); if (strcmp(locale, "C") == 0) locale = ""; UserLocale = String(locale); + if (UserLocale.FindLast('.') != -1) + UserLocale = UserLocale.Left(UserLocale.Find('.')); + UserLocale.Replace('_', '-'); // Get computer name string gethostname(buffer, UNIX_APP_BUFF_SIZE);