Skip to main content
InterviewHubPRO
Section Overview
Q188

Question 188 of 283

Part 8: Internationalization (i18n), Testing & DOM Directives (177 - 212)

66%
Angular Master (283 Qs)•Part 8: Internationalization (i18n), Testing & DOM Directives (177 - 212)

How do you provide build configuration for multiple locales?

mid LevelCode ExampleDirectivesTesting

You can provide build configuration such as translation file path, name, format and application url in configuration settings of Angular.json file. For example, the German version of your application configured the build as follows,

javascript
"configurations": {
"de": {
  "aot": true,
  "outputPath": "dist/my-project-de/",
  "baseHref": "/fr/",
  "i18nFile": "src/locale/messages.de.xlf",
  "i18nFormat": "xlf",
  "i18nLocale": "de",
  "i18nMissingTranslation": "error",
}