This is a website boilerplate for Payload CMS with localization. It is a modified version of the Payload CMS Localization Example
git clone https://github.com/tarikkavaz/Payload-Localized-Website.git
Clone the repositorycd Payload-Localized-Website
Navigate to the project directorycp .env.example .env
(copy the .env.example file to .env)docker compose up
- Seed your database in the admin panel (see below)
To seed the database with a few pages and posts you can click the 'seed database' link from the admin panel. The seed contains English and Turkish pages and posts.
To add a locale to the app, edit the file src/i18n/localization.ts
.
Add your locale code and name as a label. The file is self-explanatory.
You can see the difference between the initial and current codebase in the difference.md file.