mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
noVNC language is now sync'ed with MeshCentral.
This commit is contained in:
parent
69952904eb
commit
0b7fb139c4
4 changed files with 8 additions and 5 deletions
|
@ -20,9 +20,11 @@ export class Localizer {
|
|||
}
|
||||
|
||||
// Configure suitable language based on user preferences
|
||||
setup(supportedLanguages) {
|
||||
setup(supportedLanguages, language) {
|
||||
this.language = 'en'; // Default: US English
|
||||
|
||||
if (language != null) { this.language = language; return; }
|
||||
|
||||
/*
|
||||
* Navigator.languages only available in Chrome (32+) and FireFox (32+)
|
||||
* Fall back to navigator.language for other browsers
|
||||
|
|
|
@ -1658,7 +1658,8 @@ const UI = {
|
|||
|
||||
// Set up translations
|
||||
const LINGUAS = ["cs", "de", "el", "es", "ko", "nl", "pl", "ru", "sv", "tr", "zh_CN", "zh_TW"];
|
||||
l10n.setup(LINGUAS);
|
||||
if (urlargs.l == "zh-chs") { urlargs.l = "zh_CN"; }
|
||||
l10n.setup(LINGUAS, urlargs.l);
|
||||
if (l10n.language === "en" || l10n.dictionary !== undefined) {
|
||||
UI.prime();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue