Skip to content

Commit

Permalink
Default language issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratikshakhandagale committed May 30, 2024
1 parent 43abb7c commit c72176a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@ export function initializeFactory(init: DbService) {
})

export class AppModule {
constructor(private translate: TranslateService) {
constructor(private translate: TranslateService, private storage: StorageService) {
this.setDefaultLanguage();
}

private setDefaultLanguage() {
this.storage.setData('lang', 'hi');
this.translate.setDefaultLang('hi');
this.translate.use("hi");
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/home/home.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class HomePage implements OnInit, OnTabViewWillEnter, OnDestroy {
this.serverError = false;
this.showSheenAnimation = true;
// try {
let lang = 'en';//await this.storage.getData('lang')
let lang = await this.storage.getData('lang')
let content = await this.configService.getAllContent(req, lang);
this.mappUIContentList(content);
// }
Expand Down

0 comments on commit c72176a

Please sign in to comment.