This demonstrates using Plasmic i18n with lingui.
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 intolocales/en/messages.po
.- You can then add translations to other languages in
locales/X/messages.po
. - Running
npm run i18n-compile
will generate correspondinglocales/X/messages.js
files needed for lingui.
i18n-specific code is in:
_app.tsx
, where we use lingui's<I18nProvider />
i18n.tsx
, where we definePlasmicTranslator
using lingui primitives.index.tsx
, wherePlasmicTranslator
is passed into<PlasmicRootProvider />
.