Changed everything to use translate pipeline instead of hardcoded text and added german translations

This commit is contained in:
itzMiney committed 2025-06-11 01:08:36 +02:00
1 parent 5c7f0074f3
commit cfa971f856
33 files changed
+758 -321

No files matched your search

+15 -2
View File
@@ -2,21 +2,34 @@ import {Component, OnInit} from '@angular/core';
import {NavigationEnd, Router, RouterLink} from '@angular/router';
import {DeviceDetectorService} from 'ngx-device-detector';
import {filter} from 'rxjs/operators';
import {TranslatePipe, TranslateService} from '@ngx-translate/core';
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.css'],
imports: [
RouterLink
RouterLink,
TranslatePipe
]
})
export class NavbarComponent implements OnInit {
currentLang: string;
activeLink: string = '';
isMobile: boolean;
constructor(private router: Router, private deviceService: DeviceDetectorService) {
constructor(
private router: Router,
private deviceService: DeviceDetectorService,
private translate: TranslateService
) {
this.isMobile = this.deviceService.isMobile();
this.currentLang = this.translate.currentLang || this.translate.getDefaultLang() || 'en';
}
switchLang(lang: string) {
this.translate.use(lang);
this.currentLang = lang;
}
ngOnInit(): void {