- Concepts
Internationalization using ngx-translate
Version: 1.x
Content SDK's Angular implementation provides internationalization (i18n) support across three areas:
- Dictionary-based translations - integrates with the ngx-translate library to enable translations via Sitecore dictionaries. All ngx-translatefeatures are supported, including
TranslatePipe. Translations resolve based on the current route's locale. - Multi-language page content rendering - renders page content in the language matching the current route locale, fetching the appropriate language version from your Sitecore instance.
- Locale-aware router links - automatically applies the locale prefix to links on the page when the current route includes a supported locale in the URL.
Configuring internationalization
You can configure internationalization behavior in sitecore.config.ts:
Setting | Environment variable | Description |
|---|---|---|
|
| Sets the default language for to load pages and dictionaries for your site. |
| N/A | Lists the languages supported by the app. |
Locale resolution behavior
The angular.locales setting determines which URL prefixes are recognized as locale identifiers. For example, if locales is set to ['en', 'da']:
da/Aboutanden/Aboutare parsed as locale links and resolve content in the corresponding language.da-DK/Aboutresolves to a 404 unlessda-DKis explicitly listed inangular.localesor exists as a routable page in your Sitecore deployment.
If you have suggestions for improving this article, let us know!