Merge pull request #3211 from tidusjar/feature/sk-lang

Add SK lang
pull/3212/head^2^2
Jamie 5 years ago committed by GitHub
commit c33c9056da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

@ -43,13 +43,13 @@ export class AppComponent implements OnInit {
__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.translate.setDefaultLang("en");
// See if we can match the supported langs with the current browser lang
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() {

Loading…
Cancel
Save