Browse Source

HTML5: Make `OS.get_locale()` match other platforms

Fixes #63029.
pattlebass 3 years ago
parent
commit
d57a76c809
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 = navigator.languages ? navigator.languages[0] : navigator.language;
 			locale = locale.split('.')[0];
 			locale = locale.split('.')[0];
 		}
 		}
+		locale = locale.replace('-', '_');
 		const onExit = this.onExit;
 		const onExit = this.onExit;
 
 
 		// Godot configuration.
 		// Godot configuration.