Browse Source

Merge pull request #63043 from pattlebass/fix-html5-locale

HTML5: Make locale string match other platforms
Fabio Alessandrelli 3 years ago
parent
commit
08f3053641
1 changed files with 1 additions and 0 deletions
  1. 1 0
      platform/javascript/js/engine/config.js

+ 1 - 0
platform/javascript/js/engine/config.js

@@ -334,6 +334,7 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
 			locale = navigator.languages ? navigator.languages[0] : navigator.language;
 			locale = locale.split('.')[0];
 		}
+		locale = locale.replace('-', '_');
 		const onExit = this.onExit;
 
 		// Godot configuration.