summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-02-17 09:31:57 +0100
committerGitHub <noreply@github.com>2018-02-17 09:31:57 +0100
commit3d4bf5a90e9b32c6c93647c7fa08785b22cd5442 (patch)
tree1ab1ae07af3917d04946091685866f44889f8195 /core
parent13e9ee50fecaea1f1b61541345964419335adb6b (diff)
parent0c7bed45c49b19bf49b2f2f462937fe14b26c3bb (diff)
Merge pull request #16702 from godotengine/locales-iw-in
Add locale renames for Hebrew and Indonesian on Windows
Diffstat (limited to 'core')
-rw-r--r--core/translation.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/core/translation.cpp b/core/translation.cpp
index 32096d2eab..aaa4de5912 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -34,6 +34,14 @@
#include "os/os.h"
#include "project_settings.h"
+// ISO 639-1 language codes, with the addition of glibc locales with their
+// regional identifiers. This list must match the language names (in English)
+// of locale_names.
+//
+// References:
+// - https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
+// - https://lh.2xlibre.net/locales/
+
static const char *locale_list[] = {
"aa", // Afar
"aa_DJ", // Afar (Djibouti)
@@ -756,8 +764,17 @@ static const char *locale_names[] = {
0
};
+// Windows has some weird locale identifiers which do not honor the ISO 639-1
+// standardized nomenclature. Whenever those don't conflict with existing ISO
+// identifiers, we override them.
+//
+// Reference:
+// - https://msdn.microsoft.com/en-us/library/windows/desktop/ms693062(v=vs.85).aspx
+
static const char *locale_renames[][2] = {
- { "no", "nb" },
+ { "in", "id" }, // Indonesian
+ { "iw", "he" }, // Hebrew
+ { "no", "nb" }, // Norwegian Bokmål
{ NULL, NULL }
};