|
@@ -17,6 +17,7 @@ import { Store } from '@ngxs/store';
|
|
|
import config from '../config/config.json';
|
|
import config from '../config/config.json';
|
|
|
import { UIAuthActions } from 'angularlib/login/state/login.actions';
|
|
import { UIAuthActions } from 'angularlib/login/state/login.actions';
|
|
|
import { Platform } from '@angular/cdk/platform';
|
|
import { Platform } from '@angular/cdk/platform';
|
|
|
|
|
+import { AppSettingsAction } from 'angularlib/ui.state/ui.state.actions';
|
|
|
|
|
|
|
|
@Component({
|
|
@Component({
|
|
|
selector: 'app-root',
|
|
selector: 'app-root',
|
|
@@ -118,6 +119,9 @@ export class AppComponent extends BaseComponent implements OnInit {
|
|
|
*/
|
|
*/
|
|
|
protected changeLanguage(language: string) {
|
|
protected changeLanguage(language: string) {
|
|
|
this.store.dispatch(new ChangeLanguage(language));
|
|
this.store.dispatch(new ChangeLanguage(language));
|
|
|
|
|
+ if (language.startsWith('en')) this.store.dispatch(new AppSettingsAction.SetLocale('en-MY'));
|
|
|
|
|
+ if (language.startsWith('zh')) this.store.dispatch(new AppSettingsAction.SetLocale('zh-CN'));
|
|
|
|
|
+ if (language.startsWith('ms')) this.store.dispatch(new AppSettingsAction.SetLocale('ms-MY'));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
protected addNotification() {
|
|
protected addNotification() {
|