Does PayloadCMS i18n support frontend NextJS applications or only backend/Admin Panel? #12759
-
Hi PayloadCMS team and community! 👋 I'm new to PayloadCMS and have a question about the i18n functionality mentioned in the documentation. Context: Admin Panel interface translations (30+ languages) Backend API error messages Custom translations for collections, globals, and field labels TypeScript support for custom translations My Question: Specific scenarios I'm wondering about: Can I use PayloadCMS i18n translations directly in my NextJS frontend components? Do I need to implement a separate i18n solution (like next-i18next, next-intl, etc.) for the frontend? If PayloadCMS i18n doesn't cover frontend, what's the recommended approach for maintaining consistency between backend and frontend translations? Additional context: Any guidance or examples would be greatly appreciated! Thanks in advance! 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
i18n is for the admin panel, this means you can have translations for every language available in the admin panel, you make the choice which languages to support by including them in your project. This translates the admin panel, not your content. Localization is for your own content, this allows you to define languages which can then be edited by your content editor, you can create any locale you want and edit content for that locale. |
Beta Was this translation helpful? Give feedback.
The documentation for I18n is only for the payload admin panel the
/admin
route in your project. If your own frontend needs translations you can use Localization to have content in multiple languages. But for the case of the submit button you would most likely use a package likenext-intl
to render that data into multiple languages, since its values that don't really change in doesn't need to be in the admin panel and can be saved in a json file in the project. You can of course register that button text value in PayloadCMS if you want to.