Localization

Localization feature bootstrapped in "src\app\app.component.ts" file (see "localization setup" and "localization listener" sections) and manages ngx-translate/core package.

Additional info: https://github.com/ngx-translate/core

Setting up the framework to a completed, translated web app in easy 3 steps:

Step 1: Adding translate config file

Add translate file to locales folder "src/locales/fr-FR.js" with some locale settings

src/locales/fr-FR.js
export default {
'topBar.issuesHistory': 'Histoire des problèmes',
...
}

Step 2: Register configuration

Import added previously configuration in "src\app\app.component.ts"

src/localization.vue
import french from 'locales/fr-FR'
const locales = {
'fr-FR': french,
...
}

Step 3: Add formatter to any component

{{ 'topBar.issuesHistory' | translate }}

How to dynamically change the language?

Just dispatch CHANGE_SETTING action for changing locale setting:

this.store.dispatch(
new SettingsActions.SetStateAction({
locale: 'fr-FR',
}),
)