ng2 i18n: use NOT english as a default language in templates

Viewed 317

I'm developing app for russian speaking people. English locale is 'backup'. So i'd like to see russian words in my templates to make it easier to understand. It works fine, but injected LOCALE_ID is always 'en-US' if I don't provide in in module setup. Or it's always 'ru' if I provide, disregarding to the --configuration flag

Is is possible to set default language to NOT english?

My angular.json looks like

"build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
             ...
            "i18nLocale": "ru",
          },
          "configurations": {
              "en": {
                  "i18nFile": "app/assets/i18n/messages.en.xlf",
                  "i18nFormat": "xlf",
                  "i18nLocale": "en",
                  "i18nMissingTranslation": "error"
              }
         }

I serve app with ng serve my-app --configuration en for english and with for russian ng serve my-app

0 Answers
Related