aboutsummaryrefslogtreecommitdiffstats
path: root/src/Lang.hx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Lang.hx')
-rw-r--r--src/Lang.hx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Lang.hx b/src/Lang.hx
index 597e4d9..94c48b7 100644
--- a/src/Lang.hx
+++ b/src/Lang.hx
@@ -30,7 +30,7 @@ class Lang {
public static function init(folderPath:String, ?callback:() -> Void):Void {
#if (js && !nodejs)
// Filter unused languages
- ids = ids.filter(id -> id == lang || id == "en");
+ ids = ids.filter(id -> id == lang || id == ids[0]);
#end
langs.clear();
var count = 0;
@@ -51,13 +51,13 @@ class Lang {
#if (sys || nodejs)
public static function get(lang:String, ?key:String):String {
- if (langs[lang] == null) lang = "en";
+ if (langs[lang] == null) lang = ids[0];
final text = langs[lang][key];
return text ?? key;
}
#else
public static function get(key:String):String {
- if (langs[lang] == null) lang = "en";
+ if (langs[lang] == null) lang = ids[0];
final text = langs[lang][key];
return text ?? key;
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage