[ADF-1706] Translate ADF i18n strings into all supported languages (#2490)

* ALL LANGUAGES: This includes all ADF UI files localised into 10 languages as indicated in JIRA ADF-1706: Translate ADF i18n strings into all supported languages

* ITALIAN: Small amends to Italian strings as part of previous commit to complete ADF-1706

* Add multilanguages

* Load the languages from the app config file

* Fix it json

* Simplify the adf menu languages

* Removed unused code

* Basic documentation

* Fix unit test
This commit is contained in:
Maurizio Vitale
2017-10-18 15:50:52 +01:00
committed by Eugenio Romano
parent 1cafaa11f1
commit ed36d08344
184 changed files with 6050 additions and 253 deletions

View File

@@ -309,6 +309,7 @@ for more information about installing and using the source code.
- [Info drawer layout component](info-drawer-layout.component.md)
- [Info drawer component](info-drawer.component.md)
- [Pagination component](pagination.component.md)
- [Language Manu](language-menu.component.md)
- [Toolbar divider component](toolbar-divider.component.md)
- [Toolbar title component](toolbar-title.component.md)
- [Toolbar component](toolbar.component.md)

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -0,0 +1,81 @@
# Language Menu component
Displays all the languages that are present in the "app.config.json" or the defaul one (EN).
![Language Menu screenshot](docassets/images/languages-menu.png)
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
<!-- toc -->
- [Basic usage](#basic-usage)
- [Details](#details)
- [Nested menu lanugages](#nested-menu-languages)
- [Nested menu details](#nested-menu-details)
<!-- tocstop -->
<!-- markdown-toc end -->
## Basic usage
How to attach an ADF Language Menu as main menu
```html
<button mat-icon-button [matMenuTriggerFor]="langMenu">
<mat-icon>language</mat-icon>
</button>
<mat-menu #langMenu="matMenu">
<adf-lanugage-menu></adf-lanugage-menu>
</mat-menu>
```
## Details
In the previous example we are using the ADF Language Menu as main menu.
The Language Menu component is able to fetch all the languages from the "app.config.json".
This is how the configuration looks like in the the "app.config.json"
```json
"languages": [
{
"key": "en",
"label": "English"
},
{
"key": "fr",
"label": "French"
},
{
"key": "it",
"label": "Italian"
}
]
```
In case no setting is provided, the component shows only the English language.
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
<!-- seealso start -->
## Nested Menu lanugages
How to attach an ADF Language Menu as nested menu
```html
<button md-icon-button class="dw-profile-menu" [mdMenuTriggerFor]="profileMenu">
<md-icon>more_vert</md-icon>
</button>
<md-menu #profileMenu="mdMenu">
<button md-menu-item>profile-settings</button>
<button md-menu-item [matMenuTriggerFor]="langMenu">Languages</button>
<button md-menu-item>sign-out</button>
</md-menu>
<md-menu #langMenu="mdMenu">
<adf-lanugage-menu></adf-lanugage-menu>
</md-menu>
```
![Nested Language Menu screenshot](docassets/images/languages-menu-nested.png)
## Nested menu details
In the previous example we are using the ADF Language Menu as nested menu.
<!-- seealso end -->