Skip to content

Commit 32b73ee

Browse files
authored
AI-powered i18n (#2773)
* Add draft * Fix broken anchor * Manually revert changes for feature flags docs * Revert one more missed change to feature flags * Remove feature flag badges * Fix wrong icon and screenshots for "Fill in from another locale" * Refine content after testing the experimental version + add screenshots * Tweak content to ensure it reflects "one-way sync" behavior
1 parent b209f51 commit 32b73ee

File tree

8 files changed

+47
-4
lines changed

8 files changed

+47
-4
lines changed

docusaurus/docs/cms/features/internationalization.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ tags:
1111
- features
1212
---
1313

14+
import StrapiAiCredits from '/docs/snippets/strapi-ai-credits.md'
15+
1416
# Internationalization (i18n)
1517

1618
<Tldr>
@@ -83,6 +85,21 @@ It is not possible to create custom locales. Locales can only be created based o
8385
}}
8486
/>
8587

88+
#### Enabling AI-powered internationalization
89+
<GrowthBadge />
90+
91+
AI-Powered Internationalization enables automatic translations for all the locales in a project when the content in the default locale is updated. This enables content editors to have their content translated into multiple languages within a few seconds.
92+
93+
AI-powered Internationalization is disabled by default. To enable it, go to <Icon name="gear-six" /> *Settings > Global Settings > Internationalization* and set <Icon name="sparkle" /> _AI Translations_ to _Enabled_.
94+
95+
<ThemedImage
96+
alt="Internationalization settings"
97+
sources={{
98+
light: '/img/assets/settings/i18n-with-ai.png',
99+
dark: '/img/assets/settings/i18n-with-ai_DARK.png',
100+
}}
101+
/>
102+
86103
### Code-based configuration
87104

88105
A `STRAPI_PLUGIN_I18N_INIT_LOCALE_CODE` [environment variable](/cms/configurations/environment#strapi) can be configured to set the default locale for your environment. The value used for this variable should be an ISO country code from <ExternalLink to="https://github.com/strapi/strapi/blob/main/packages/plugins/i18n/server/src/constants/iso-locales.json" text="the 500+ pre-created list of locales"/>.
@@ -105,10 +122,6 @@ To translate content in another locale:
105122
2. Choose the locale in which you want to translate your content.
106123
3. Translate your content by filling up your content-type's fields.
107124

108-
:::tip
109-
Click on the <Icon name="download-simple" /> *Fill in from another locale* button, in the top right corner, for all non relational fields to be filled up with the values of another chosen locale. It can be useful if you do not remember what was the exact content in another locale.
110-
:::
111-
112125
<ThemedImage
113126
alt="Managing locales with i18n"
114127
sources={{
@@ -117,6 +130,33 @@ Click on the <Icon name="download-simple" /> *Fill in from another locale* butto
117130
}}
118131
/>
119132

133+
:::tip
134+
Click on the <Icon name="globe-hemisphere-west" /> *Fill in from another locale* button, in the top right corner, for all non relational fields to be filled up with the values of another chosen locale. It can be useful if you do not remember what was the exact content in another locale. This button is not visible if you've enabled [AI-powered internationalization](#ai-powered-internationalization) since translations are automatically handled by Strapi AI.
135+
:::
136+
137+
### AI-powered internationalization <NewBadge /> {#ai-powered-internationalization}
138+
<GrowthBadge />
139+
140+
[When enabled](#enabling-ai-powered-internationalization), AI-powered internationalization enables automatic translations for all the locales in a project when the source content is updated. This enables content editors to have their content translated into multiple languages within a few seconds. The idea behind the feature is to ensure users only manually fill in content in the default locale, and Strapi AI translates it for all other existing locales.
141+
142+
Once enabled, whenever you edit a content-type in the default locale and click **Save**, all other locales for the content-type should be translated automatically, which will be confirmed by an _All locales have been translated_ notification. Using this feature consumes Strapi AI credits.
143+
144+
<ThemedImage
145+
alt="Managing locales with AI-powered i18n"
146+
sources={{
147+
light: '/img/assets/content-manager/locale-i18n-with-ai.png',
148+
dark: '/img/assets/content-manager/locale-i18n-with-ai_DARK.png',
149+
}}
150+
/>
151+
152+
:::caution
153+
AI-powered internationalization only works one way, keeping the default locale content as the unique source of truth. Consequently, once the feature is enabled:
154+
- Editing and saving content for any locale othen than the default one will not trigger automatic translations.
155+
- When editing the content for the default locale, the manual modifications made to other locales will be overwritten.
156+
:::
157+
158+
<StrapiAiCredits />
159+
120160
### Usage with APIs
121161

122162
Localized content can be requested, created, updated, and deleted for a given locale through the various front-end APIs accessible from [Strapi's Content API](/cms/api/content-api):

docusaurus/sidebars.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ const sidebars = {
9090
type: 'doc',
9191
label: 'Internationalization (i18n)',
9292
id: 'cms/features/internationalization',
93+
customProps: {
94+
updated: true,
95+
},
9396
},
9497
{
9598
type: 'doc',
442 KB
Loading
455 KB
Loading
-101 KB
Loading
-97.1 KB
Loading
416 KB
Loading
418 KB
Loading

0 commit comments

Comments
 (0)