Update UI.js

This commit is contained in:
jelveh
2025-08-15 23:42:17 -07:00
parent d807672af7
commit 470dbc8d6b
+5
View File
@@ -1541,6 +1541,11 @@ class UI extends EventListener {
* console.log(`Current language: ${currentLang}`); // e.g., "Current language: fr"
*/
getLanguage() {
// In GUI environment, access the global locale directly
if(this.env === 'gui'){
return window.locale;
}
return new Promise((resolve) => {
this.#postMessageWithCallback('getLanguage', resolve, {});
});