diff --git a/docs/features/i18n.md b/docs/features/i18n.md deleted file mode 100644 index 34812e6d2..000000000 --- a/docs/features/i18n.md +++ /dev/null @@ -1,78 +0,0 @@ -# Internationalization (i18n) - -The Content Application provides support for the following languages: - -- German (`de`) -- English (`en`) -- Spanish (`es`) -- French (`fr`) -- Italian (`it`) -- Japanese (`ja`) -- Norwegian (`nb`) -- Dutch (`nl`) -- Brazilian Portuguese (`pt-BR`) -- Russian (`ru`) - -The fallback locale is the English one, however current browser language is taken as the default one automatically when the application starts. - -## User-defined language - -You can allow users to set custom language that gets saved to user preferences. -The main application menu already has the [ADF Language Menu](https://github.com/Alfresco/alfresco-ng2-components/blob/development/docs/language-menu.component.md) component integrated and pre-filled with the supported items. - -To change the default language set edit the `app.config.json` file and add or remove items: - -```json -{ - ..., - "languages": [ - { - "key": "de", - "label": "German" - }, - { - "key": "en", - "label": "English" - }, - { - "key": "es", - "label": "Spanish" - }, - ... - ] -} -``` - -The file is located at the following path: `/src/app.config.json`. - -## Custom languages - -To add a custom language, add a new "JSON" file to the "/src/assets/i18n" folder -with the name of the target locale, for instance, a "de.json" for the "German". - -Translate the resource strings based on the default "en.json" file. -You can copy the content over to your newly created file and replace English values with translated text. - -```json -{ - "APP": { - "SIGN_IN": "Anmelden", - "SIGN_OUT": "Abmelden", - "NEW_MENU": { - "LABEL": "Neu", - "MENU_ITEMS": { - "CREATE_FOLDER": "Ordner erstellen", - "UPLOAD_FILE": "Datei hochladen", - "UPLOAD_FOLDER": "Ordner hochladen" - }, - ... - } - }, - ... -} -``` - -The Content Application automatically bundles your file upon project build. -You can test your locale by changing the browser language settings and reloading the page. - -Optionally, you can extend the [ADF Language Menu](https://github.com/Alfresco/alfresco-ng2-components/blob/development/docs/language-menu.component.md) component with the newly added language by updating the `app.config.json` file. diff --git a/docs/features/routing.md b/docs/features/routing.md deleted file mode 100644 index 072758dbc..000000000 --- a/docs/features/routing.md +++ /dev/null @@ -1,3 +0,0 @@ -# Routing - -Coming soon... diff --git a/docs/index.html b/docs/index.html index f400a0869..2530e9341 100644 --- a/docs/index.html +++ b/docs/index.html @@ -17,20 +17,6 @@ { title: 'Home', path: '/' - }, - { - title: 'Features', - type: 'dropdown', - items: [ - { - title: 'i18n', - path: '/features/i18n' - }, - { - title: 'Routing', - path: '/features/routing' - } - ] } ], icons: [ diff --git a/src/app.config.json b/src/app.config.json index 150adad4a..cbfca6409 100644 --- a/src/app.config.json +++ b/src/app.config.json @@ -18,47 +18,5 @@ "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 007305e1d..461a4e632 100644 --- a/src/app/components/current-user/current-user.component.html +++ b/src/app/components/current-user/current-user.component.html @@ -11,12 +11,8 @@ - - - - diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 8d9eca8fe..db738da15 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -1,6 +1,5 @@ { "APP": { - "LANGUAGE": "Language", "SIGN_IN": "Sign in", "SIGN_OUT": "Sign out", "NEW_MENU": {