diff --git a/wowup-electron/src/app/app.component.ts b/wowup-electron/src/app/app.component.ts
index 0b874ceb..ff24a098 100644
--- a/wowup-electron/src/app/app.component.ts
+++ b/wowup-electron/src/app/app.component.ts
@@ -38,9 +38,21 @@ export class AppComponent implements AfterViewInit {
private _dialog: MatDialog,
private _addonService: AddonService
) {
+ this.translate.addLangs([
+ "en",
+ "de",
+ "es",
+ "fr",
+ "it",
+ "ko",
+ "nb",
+ "pt",
+ "ru",
+ "zh",
+ ]);
this.translate.setDefaultLang("en");
-
this.translate.use(this._electronService.locale);
+ this.translate.use(this._wowUpService.setCurrentLanguage);
}
ngAfterViewInit(): void {
diff --git a/wowup-electron/src/app/components/options-app-section/options-app-section.component.html b/wowup-electron/src/app/components/options-app-section/options-app-section.component.html
index 079391b1..e350c604 100644
--- a/wowup-electron/src/app/components/options-app-section/options-app-section.component.html
+++ b/wowup-electron/src/app/components/options-app-section/options-app-section.component.html
@@ -6,20 +6,35 @@
-
{{ "PAGES.OPTIONS.APPLICATION.TELEMETRY_LABEL" | translate }}
+
+ {{ "PAGES.OPTIONS.APPLICATION.TELEMETRY_LABEL" | translate }}
+
-
+
-
{{ "PAGES.OPTIONS.APPLICATION.TELEMETRY_DESCRIPTION" | translate }}
+
+ {{ "PAGES.OPTIONS.APPLICATION.TELEMETRY_DESCRIPTION" | translate }}
+
-
{{ "PAGES.OPTIONS.APPLICATION.MINIMIZE_ON_CLOSE_LABEL" | translate }}
+
+ {{ "PAGES.OPTIONS.APPLICATION.MINIMIZE_ON_CLOSE_LABEL" | translate }}
+
-
+
{{ minimizeOnCloseDescription }}
@@ -28,39 +43,76 @@
-
{{ "PAGES.OPTIONS.APPLICATION.ENABLE_SYSTEM_NOTIFICATIONS_LABEL" | translate }}
+
+ {{
+ "PAGES.OPTIONS.APPLICATION.ENABLE_SYSTEM_NOTIFICATIONS_LABEL"
+ | translate
+ }}
+
-
+
- {{ "PAGES.OPTIONS.APPLICATION.ENABLE_SYSTEM_NOTIFICATIONS_DESCRIPTION" | translate }}
+ {{
+ "PAGES.OPTIONS.APPLICATION.ENABLE_SYSTEM_NOTIFICATIONS_DESCRIPTION"
+ | translate
+ }}
-
{{ "PAGES.OPTIONS.APPLICATION.USE_HARDWARE_ACCELERATION_LABEL" | translate }}
+
+ {{
+ "PAGES.OPTIONS.APPLICATION.USE_HARDWARE_ACCELERATION_LABEL"
+ | translate
+ }}
+
-
+
-
{{ "PAGES.OPTIONS.APPLICATION.USE_HARDWARE_ACCELERATION_DESCRIPTION" | translate }}
+
{{
+ "PAGES.OPTIONS.APPLICATION.USE_HARDWARE_ACCELERATION_DESCRIPTION"
+ | translate
+ }}
-
{{ "PAGES.OPTIONS.APPLICATION.START_WITH_SYSTEM_LABEL" | translate }}
-
{{ "PAGES.OPTIONS.APPLICATION.START_WITH_SYSTEM_DESCRIPTION" | translate }}
+
+ {{ "PAGES.OPTIONS.APPLICATION.START_WITH_SYSTEM_LABEL" | translate }}
+
+
{{
+ "PAGES.OPTIONS.APPLICATION.START_WITH_SYSTEM_DESCRIPTION" | translate
+ }}
-
+
@@ -68,13 +120,66 @@
-
{{ "PAGES.OPTIONS.APPLICATION.START_MINIMIZED_LABEL" | translate }}
-
{{ "PAGES.OPTIONS.APPLICATION.START_MINIMIZED_DESCRIPTION" | translate }}
+
+ {{ "PAGES.OPTIONS.APPLICATION.START_MINIMIZED_LABEL" | translate }}
+
+
{{
+ "PAGES.OPTIONS.APPLICATION.START_MINIMIZED_DESCRIPTION" | translate
+ }}
-
+
+
+
+
+
+
+ {{ "PAGES.OPTIONS.APPLICATION.SET_LANGUAGE_LABEL" | translate }}
+
+
{{
+ "PAGES.OPTIONS.APPLICATION.SET_LANGUAGE_DESCRIPTION" | translate
+ }}
+
+
+ {{
+ "PAGES.OPTIONS.APPLICATION.CURRENT_LANGUAGE_LABEL" | translate
+ }}
+
+
+
+ English
+ German
+ Spanish
+ French
+ Italian
+ Korean
+ Norwegian
+ Portuguese
+ Russian
+ Chinese
+ {{ language }}
+
+
+
+
+
+
diff --git a/wowup-electron/src/app/components/options-app-section/options-app-section.component.ts b/wowup-electron/src/app/components/options-app-section/options-app-section.component.ts
index 7a420d42..5e094558 100644
--- a/wowup-electron/src/app/components/options-app-section/options-app-section.component.ts
+++ b/wowup-electron/src/app/components/options-app-section/options-app-section.component.ts
@@ -1,5 +1,6 @@
import { Component, OnInit } from "@angular/core";
import { MatDialog } from "@angular/material/dialog";
+import { MatSelectChange } from "@angular/material/select";
import { MatSlideToggleChange } from "@angular/material/slide-toggle";
import { TranslateService } from "@ngx-translate/core";
import { ElectronService } from "app/services";
@@ -19,6 +20,8 @@ export class OptionsAppSectionComponent implements OnInit {
public startWithSystem = false;
public telemetryEnabled = false;
public useHardwareAcceleration = true;
+ public setCurrentLanguage: string = "";
+ public languages: string[] = [];
constructor(
private _analyticsService: AnalyticsService,
@@ -48,6 +51,8 @@ export class OptionsAppSectionComponent implements OnInit {
this.useHardwareAcceleration = this.wowupService.useHardwareAcceleration;
this.startWithSystem = this.wowupService.startWithSystem;
this.startMinimized = this.wowupService.startMinimized;
+ this.setCurrentLanguage = this.wowupService.setCurrentLanguage;
+ this.languages = this._translateService.getLangs();
}
onEnableSystemNotifications = (evt: MatSlideToggleChange) => {
@@ -99,4 +104,27 @@ export class OptionsAppSectionComponent implements OnInit {
this._electronService.restartApplication();
});
};
+
+ onSetCurrentLanguageChange = (evt: MatSelectChange) => {
+ const dialogRef = this._dialog.open(ConfirmDialogComponent, {
+ data: {
+ title: this._translateService.instant(
+ "PAGES.OPTIONS.APPLICATION.SET_LANGUAGE_CONFIRMATION_LABEL"
+ ),
+ message: this._translateService.instant(
+ "PAGES.OPTIONS.APPLICATION.SET_LANGUAGE_CONFIRMATION_DESCRIPTION"
+ ),
+ },
+ });
+
+ dialogRef.afterClosed().subscribe((result) => {
+ if (!result) {
+ evt.value = "en";
+ return;
+ }
+
+ this.wowupService.setCurrentLanguage = evt.value;
+ this._electronService.restartApplication();
+ });
+ };
}
diff --git a/wowup-electron/src/app/components/wow-client-options/wow-client-options.component.html b/wowup-electron/src/app/components/wow-client-options/wow-client-options.component.html
index a33e746e..2a52033a 100644
--- a/wowup-electron/src/app/components/wow-client-options/wow-client-options.component.html
+++ b/wowup-electron/src/app/components/wow-client-options/wow-client-options.component.html
@@ -18,8 +18,15 @@
}}
-