diff --git a/lime/system/Locale.hx b/lime/system/Locale.hx index 8581a9013..3c2f8af6a 100644 --- a/lime/system/Locale.hx +++ b/lime/system/Locale.hx @@ -116,6 +116,9 @@ abstract Locale(String) from String to String { if (index > -1) { + var dashIndex = this.indexOf ("-"); + if (dashIndex > -1 && dashIndex < index) index = dashIndex; + return this.substring (0, index); }