Internationalization (i18n) in Strapi
Strapi has a built-in i18n plugin for multilingual content. Each record exists in multiple locales independently. The API returns the content of the required locale by the ?locale= parameter.
Enabling i18n
# i18n plugin is included with Strapi
# Enable in config/plugins.js:
module.exports = {
i18n: { enabled: true },
}
In Admin: Settings → Internationalization → Add a locale. Add ru, en, uk.
Content Type Localization
In Content-Type Builder enable "Enable localization" for each field:
// src/api/article/content-types/article/schema.json
{
"options": { "draftAndPublish": true },
"pluginOptions": { "i18n": { "localized": true } },
"attributes": {
"title": {
"type": "string",
"pluginOptions": { "i18n": { "localized": true } }
},
"content": {
"type": "richtext",
"pluginOptions": { "i18n": { "localized": true } }
},
"slug": {
"type": "uid",
"targetField": "title",
"pluginOptions": { "i18n": { "localized": true } }
},
"publishedAt": {
"type": "datetime"
// NOT localized — same date for all languages
}
}
}
API Requests with Locale
# Get articles in Russian (default)
GET /api/articles?locale=ru
# Get articles in English
GET /api/articles?locale=en
# Get article with all translations
GET /api/articles/1?locale=all
# Create translation
POST /api/articles
{ "data": { "title": "English Title", "locale": "en", "localizations": [1] } }
Integration with Next.js i18n
// lib/strapi.ts
export async function getArticles(locale: string = 'ru') {
const res = await fetch(
`${process.env.STRAPI_URL}/api/articles?locale=${locale}&populate=cover,category`,
{ headers: { Authorization: `Bearer ${process.env.STRAPI_API_TOKEN}` } }
)
return res.json()
}
// next.config.js
module.exports = {
i18n: {
locales: ['ru', 'en', 'uk'],
defaultLocale: 'ru',
},
}
// app/[locale]/articles/page.tsx
export default async function ArticlesPage({ params }: { params: { locale: string } }) {
const { data } = await getArticles(params.locale)
return <ArticleList articles={data} />
}
Language Switcher in Strapi Admin
Strapi admin automatically shows a locale switcher in the edit form when i18n is enabled. Translations are linked to one document — you can switch between languages and see translation progress.
Timeline
Setting up i18n for 3 languages with localization of 3–5 content types — 1 day.







