Add SK lang

pull/3211/head
Jamie Rees 5 years ago
parent 8baa3c1f8c
commit 2c8e50e9ff

@ -127,6 +127,9 @@
<li [ngClass]="{'active': 'en' === translate.currentLang}"> <li [ngClass]="{'active': 'en' === translate.currentLang}">
<a (click)="translate.use('en')">English</a> <a (click)="translate.use('en')">English</a>
</li> </li>
<li [ngClass]="{'active': 'es' === translate.currentLang}">
<a (click)="translate.use('es')">Español</a>
</li>
<li [ngClass]="{'active': 'fr' === translate.currentLang}"> <li [ngClass]="{'active': 'fr' === translate.currentLang}">
<a (click)="translate.use('fr')">Français</a> <a (click)="translate.use('fr')">Français</a>
</li> </li>
@ -139,9 +142,6 @@
<li [ngClass]="{'active': 'it' === translate.currentLang}"> <li [ngClass]="{'active': 'it' === translate.currentLang}">
<a (click)="translate.use('it')">Italiano</a> <a (click)="translate.use('it')">Italiano</a>
</li> </li>
<li [ngClass]="{'active': 'es' === translate.currentLang}">
<a (click)="translate.use('es')">Español</a>
</li>
<li [ngClass]="{'active': 'nl' === translate.currentLang}"> <li [ngClass]="{'active': 'nl' === translate.currentLang}">
<a (click)="translate.use('nl')">Nederlands</a> <a (click)="translate.use('nl')">Nederlands</a>
</li> </li>
@ -157,6 +157,9 @@
<li [ngClass]="{'active': 'sv' === translate.currentLang}"> <li [ngClass]="{'active': 'sv' === translate.currentLang}">
<a (click)="translate.use('sv')">Svenska</a> <a (click)="translate.use('sv')">Svenska</a>
</li> </li>
<li [ngClass]="{'active': 'sk' === translate.currentLang}">
<a (click)="translate.use('sk')">Slovak</a>
</li>
</ul> </ul>
</li> </li>
</ul> </ul>

@ -43,13 +43,13 @@ export class AppComponent implements OnInit {
__webpack_public_path__ = base + "/dist/"; __webpack_public_path__ = base + "/dist/";
} }
this.translate.addLangs(["en", "de", "fr", "da", "es", "it", "nl", "sv", "no", "pl", "pt"]); this.translate.addLangs(["en", "de", "fr", "da", "es", "it", "nl", "sk", "sv", "no", "pl", "pt"]);
// this language will be used as a fallback when a translation isn't found in the current language // this language will be used as a fallback when a translation isn't found in the current language
this.translate.setDefaultLang("en"); this.translate.setDefaultLang("en");
// See if we can match the supported langs with the current browser lang // See if we can match the supported langs with the current browser lang
const browserLang: string = translate.getBrowserLang(); const browserLang: string = translate.getBrowserLang();
this.translate.use(browserLang.match(/en|fr|da|de|es|it|nl|sv|no|pl|pt/) ? browserLang : "en"); this.translate.use(browserLang.match(/en|fr|da|de|es|it|nl|sk|sv|no|pl|pt/) ? browserLang : "en");
} }
public ngOnInit() { public ngOnInit() {

Loading…
Cancel
Save