Skip to content

Commit a8337ee

Browse files
committed
Add draft
1 parent c86ba0c commit a8337ee

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

docusaurus/docs/cms/configurations/features.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ To enable a future flag:
4545
module.exports = ({ env }) => ({
4646
future: {
4747
experimental_firstPublishedAt: env.bool('STRAPI_FUTURE_EXPERIMENTAL_FIRST_PUBLISHED_AT', false),
48+
unstableAILocalizations: env.bool('STRAPI_UNSTABLE_AI_LOCALIZATIONS', false),
4849
},
4950
})
5051

@@ -54,9 +55,10 @@ To enable a future flag:
5455

5556
```json title=".env"
5657
STRAPI_FUTURE_EXPERIMENTAL_FIRST_PUBLISHED_AT=true
58+
STRAPI_UNSTABLE_AI_LOCALIZATIONS=true
5759
```
5860

59-
If your environment file does not include this value, the `experimental_firstPublishedAt` future flag property value will default to `false` and the experimental feature will not be enabled.
61+
If your environment file does not include this value, the `unstableAILocalizations` future flag property value will default to `false` and the experimental feature will not be enabled.
6062

6163
</TabItem>
6264

@@ -66,6 +68,7 @@ To enable a future flag:
6668
export default {
6769
future: {
6870
experimental_firstPublishedAt: env.bool('STRAPI_FUTURE_EXPERIMENTAL_FIRST_PUBLISHED_AT', false),
71+
unstableAILocalizations: env.bool('STRAPI_UNSTABLE_AI_LOCALIZATIONS', false),
6972
},
7073
};
7174
```
@@ -74,9 +77,10 @@ To enable a future flag:
7477

7578
```json title=".env"
7679
STRAPI_FUTURE_EXPERIMENTAL_FIRST_PUBLISHED_AT=true
80+
STRAPI_UNSTABLE_AI_LOCALIZATIONS=true
7781
```
7882

79-
If your environment file does not include this value, the `experimental_firstPublishedAt` future flag property value will default to `false` and the experimental feature will not be enabled.
83+
If your environment file does not include this value, the `unstableAILocalizations` future flag property value will default to `false` and the experimental feature will not be enabled.
8084

8185
</TabItem>
8286
</Tabs>
@@ -112,3 +116,4 @@ Developers can use the following APIs to interact with future flags:
112116
| Property name | Related feature | Suggested environment variable name |
113117
| ------------- | --------------- | ---------------------------------- |
114118
| `experimental_firstPublishedAt` | [Draft & Publish](/cms/features/draft-and-publish#recording-the-first-publication-date) | `STRAPI_FUTURE_EXPERIMENTAL_FIRST_PUBLISHED_AT` |
119+
| `unstableAILocalizations` | [AI-powered Internationalization](/cms/features/internationalization#ai-powered-internationalization) |

docusaurus/docs/cms/features/internationalization.md

Lines changed: 25 additions & 0 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,18 @@ 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 /> <FeatureFlagBadge feature="unstableAILocalizations" />
90+
91+
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.
92+
93+
AI-powered Internationalization is disabled by default. To enable it:
94+
95+
1. Ensure the `unstableAILocalizations` [feature flag](/cms/configurations/features) is set to `true`. If you've just changed this configuration property, you might need to restart the Strapi server for the changes to apply.
96+
2. Go to <Icon name="gear-six" /> *Settings > Global Settings > Internationalization* and set _AI translations_ to on.
97+
98+
<!-- TODO: add light/dark mode screenshots -->
99+
86100
### Code-based configuration
87101

88102
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"/>.
@@ -117,6 +131,17 @@ Click on the <Icon name="download-simple" /> *Fill in from another locale* butto
117131
}}
118132
/>
119133

134+
### AI-powered internationalization <NewBadge />
135+
<GrowthBadge /> <FeatureFlagBadge feature="unstableAILocalizations" />
136+
137+
[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.
138+
139+
Once enabled, whenever you edit a content-type in a given 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.
140+
141+
<!-- TODO: add screenshot -->
142+
143+
<StrapiAiCredits />
144+
120145
### Usage with APIs
121146

122147
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
@@ -85,6 +85,9 @@ const sidebars = {
8585
type: 'doc',
8686
label: 'Internationalization (i18n)',
8787
id: 'cms/features/internationalization',
88+
customProps: {
89+
updated: true,
90+
},
8891
},
8992
{
9093
type: 'doc',

0 commit comments

Comments
 (0)