This demonstrates using Plasmic i18n with next-i18next.
See full instructions at https://docs.plasmic.app/learn/localization-frameworks/
The demo project is https://studio.plasmic.app/projects/fjKQstuhKKVhuH5dkNkNtj
npm run plasmic-i18n
will export messages from the project intopublic/locales/en/common.json
.- You can then add translations to other languages in
public/locales/X/common.json
.
i18n-specific code is in:
_app.tsx
, where we wrap theApp
withnext-i18next
'sappWithTranslation()
i18n.tsx
, where we defineusePlasmicTranslator()
using lingui primitives.index.tsx
, whereusePlasmicTranslator()
is used to create a translator, passed into<PlasmicRootProvider />
.next-i18next.config.js
following the boilerplate.