1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

set locale for angular app

This commit is contained in:
Kyle Spearrin
2018-07-23 21:47:08 -04:00
parent 9d4f29f0a9
commit 65713477de
4 changed files with 18 additions and 1 deletions

View File

@@ -135,6 +135,11 @@ import { I18nPipe } from 'jslib/angular/pipes/i18n.pipe';
import { SearchCiphersPipe } from 'jslib/angular/pipes/search-ciphers.pipe';
import { SearchPipe } from 'jslib/angular/pipes/search.pipe';
import { registerLocaleData } from '@angular/common';
import localeDa from '@angular/common/locales/da';
registerLocaleData(localeDa, 'da');
@NgModule({
imports: [
BrowserModule,

View File

@@ -11,7 +11,7 @@ import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
})
export class FooterComponent implements OnInit {
version: string;
year: string = '2016';
year: string = '2015';
constructor(private platformUtilsService: PlatformUtilsService) { }

View File

@@ -1,5 +1,6 @@
import {
APP_INITIALIZER,
LOCALE_ID,
NgModule,
} from '@angular/core';
@@ -181,6 +182,11 @@ export function initFactory(): Function {
deps: [],
multi: true,
},
{
provide: LOCALE_ID,
useFactory: () => i18nService.translationLocale,
deps: [],
},
],
})
export class ServicesModule {