Skip to content

Commit

Permalink
Merge pull request #55 from Shallowmallow/FixBrowserLanguage
Browse files Browse the repository at this point in the history
On firefox && chrome, no htmlTag.lang will be empty string and not null
  • Loading branch information
ianharrigan committed Aug 31, 2024
2 parents 3ef44c0 + d8d32eb commit 3d2a56f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haxe/ui/backend/PlatformImpl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PlatformImpl extends PlatformBase {
systemLocale = htmlTag.lang;
}

if (systemLocale == null) {
if (systemLocale == null || systemLocale == "" ) {
systemLocale = Browser.navigator.language;
}
return systemLocale;
Expand Down

0 comments on commit 3d2a56f

Please sign in to comment.