Skip to content

Commit

Permalink
feat(landing): force landing page to always use english
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitMY committed Nov 24, 2024
1 parent 9180598 commit 23b9b4d
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/app/pages/landing/landing.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Component} from '@angular/core';
import {Component, inject} from '@angular/core';
import {MediaMatcher} from '@angular/cdk/layout';
import {TranslocoService} from '@ngneat/transloco';

@Component({
selector: 'app-landing',
Expand All @@ -13,4 +14,16 @@ export class LandingComponent {
constructor(private mediaMatcher: MediaMatcher) {
this.isMobile = this.mediaMatcher.matchMedia('(max-width: 768px)');
}

// TODO: remove this when i18n is supported
private transloco = inject(TranslocoService);
lastActiveLang = this.transloco.getActiveLang();

ionViewWillEnter() {
this.transloco.setActiveLang('en');
}

ionViewWillLeave() {
this.transloco.setActiveLang(this.lastActiveLang);
}
}

0 comments on commit 23b9b4d

Please sign in to comment.