diff --git a/src/app.config.json b/src/app.config.json
index cbfca6409..6d3dbe894 100644
--- a/src/app.config.json
+++ b/src/app.config.json
@@ -4,6 +4,7 @@
"name": "Alfresco Example Content Application",
"build": "1234"
},
+ "languagePicker": false,
"document-list": {
"supportedPageSizes": [
25,
@@ -18,5 +19,47 @@
"thumbs.db",
".git"
]
- }
+ },
+ "languages": [
+ {
+ "key": "de",
+ "label": "German"
+ },
+ {
+ "key": "en",
+ "label": "English"
+ },
+ {
+ "key": "es",
+ "label": "Spanish"
+ },
+ {
+ "key": "fr",
+ "label": "French"
+ },
+ {
+ "key": "it",
+ "label": "Italian"
+ },
+ {
+ "key": "ja",
+ "label": "Japanese"
+ },
+ {
+ "key": "nb",
+ "label": "Norwegian"
+ },
+ {
+ "key": "nl",
+ "label": "Dutch"
+ },
+ {
+ "key": "pt-BR",
+ "label": "Brazilian Portuguese"
+ },
+ {
+ "key": "ru",
+ "label": "Russian"
+ }
+ ]
}
diff --git a/src/app/components/current-user/current-user.component.html b/src/app/components/current-user/current-user.component.html
index 461a4e632..29e77d41d 100644
--- a/src/app/components/current-user/current-user.component.html
+++ b/src/app/components/current-user/current-user.component.html
@@ -11,8 +11,17 @@
+
+
+
+
+
+
diff --git a/src/app/components/current-user/current-user.component.ts b/src/app/components/current-user/current-user.component.ts
index cab8804f7..c37397a45 100644
--- a/src/app/components/current-user/current-user.component.ts
+++ b/src/app/components/current-user/current-user.component.ts
@@ -16,7 +16,7 @@
*/
import { Component, OnInit, OnDestroy } from '@angular/core';
-import { PeopleContentService } from 'ng2-alfresco-core';
+import { PeopleContentService, AppConfigService } from 'ng2-alfresco-core';
import { Subscription } from 'rxjs/Rx';
@Component({
@@ -29,7 +29,10 @@ export class CurrentUserComponent implements OnInit, OnDestroy {
user: any = null;
- constructor(private peopleApi: PeopleContentService) {}
+ constructor(
+ private peopleApi: PeopleContentService,
+ private appConfig: AppConfigService
+ ) {}
ngOnInit() {
this.personSubscription = this.peopleApi.getCurrentPerson()
@@ -61,4 +64,8 @@ export class CurrentUserComponent implements OnInit, OnDestroy {
const { userFirstName: first, userLastName: last } = this;
return [ first[0], last[0] ].join('');
}
+
+ get showLanguagePicker() {
+ return this.appConfig.get('languagePicker') || false;
+ }
}
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index 34d7fb1b8..c5483baab 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -1,5 +1,6 @@
{
"APP": {
+ "LANGUAGE": "Language",
"SIGN_IN": "Sign in",
"SIGN_OUT": "Sign out",
"NEW_MENU": {