Translation

The app will detect WPML languages and customers can choose the language in the account section. You have to add all translation language you use in app/src/assets/i18n/ folder

  1. Copy and en.json file and rename to your language. example fr.jon

  2. Translate right side words to your language

  3. Set default language in app/src/app/app.component.ts file inside ngAfterViewInit function. fr is the file name you have created in app/src/assets/i18n/ folder. you have to replace en with fr

this.translateService.setDefaultLang('fr');

4. If you want to change the app direction to RTL. Uncomment below code in app/src/app/app.component.ts file

document.documentElement.setAttribute('dir', 'rtl');

Last updated