Browse Source

register new locale data

tigger 1 năm trước cách đây
mục cha
commit
f0e0267352
2 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 4 0
      src/app/app.component.ts
  2. 1 1
      src/dependencies/angularlib

+ 4 - 0
src/app/app.component.ts

@@ -17,6 +17,7 @@ import { Store } from '@ngxs/store';
 import config from '../config/config.json';
 import { UIAuthActions } from 'angularlib/login/state/login.actions';
 import { Platform } from '@angular/cdk/platform';
+import { AppSettingsAction } from 'angularlib/ui.state/ui.state.actions';
 
 @Component({
   selector: 'app-root',
@@ -118,6 +119,9 @@ export class AppComponent extends BaseComponent implements OnInit {
    */
   protected changeLanguage(language: string) {
     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() {

+ 1 - 1
src/dependencies/angularlib

@@ -1 +1 @@
-Subproject commit 8ced1fcc5200a24f54b3a77b8077f3d7b7c38e98
+Subproject commit 90c148c1c7838ff3d097d0d401448628263cb3f9