Skip to main content

Overview

Here we will talk about the i18n features and capabilities of Blueprint.

next-i18next package​

We use the next-i18next package to provide content translations for static content for the Foundation app.

Translation files can be stored in a shared package or within each app's directory, as documented here. The Foundation app follows the standard approach of storing translations within the app.

Route translations​

We handle translating app routes with NextJS's built-in internationalization routing capabilities as well as some custom code. There are a number of touch-points for this:

  • Supported locales are exposed through appConfig.i18n in app.config.ts. The shared locale values are defined in the sibling app.i18n.json, which is also consumed by the Next.js and next-i18next configuration.
  • redirects and rewrites methods are defined in next.config.ts. They return arrays generated by createRewritesAndRedirects from the route translations in apps/foundation/src/app.i18n.json.

See NextJS docs for more detail on rewrites.