Signed-off-by: Bill Erickson <berickxx@gmail.com>
window.location.href = url;
}
- // Returns i18n_l objects
+ // Returns codes supported for the current environment.
supportedLocaleCodes(): string[] {
return environment.locales || [];
}
+ // Returns i18n_l objects matching the locales supported
+ // in the current environment.
supportedLocales(): Observable<IdlObject> {
const locales = this.supportedLocaleCodes();
</div>
<div class="navbar-nav" *ngIf="locales.length > 1 && currentLocale">
<div ngbDropdown class="nav-item dropdown" placement="bottom-right">
- <!-- TODO set / display current locale -->
<a ngbDropdownToggle i18n i18n-title
title="Select Locale"
class="nav-link dropdown-toggle no-caret with-material-icon">
() => {
this.currentLocale = this.locales.filter(
l => l.code() === this.locale.currentLocaleCode())[0]
- console.log('current locale ' + this.currentLocale.code());
}
);
}