mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-16 06:22:04 +00:00
Update UI.js
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
This commit is contained in:
@@ -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, {});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user