-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Dev docs updates: Internationalization plugin #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, it looks really cool overall, I'll play a bit more with it tomorrow 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
This is a really nice documentation, great job @pwizla ! 👏
Co-authored-by: meganelacheny <megane.lacheny@strapi.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One precision but the rest looks good to me :)
docs/developer-docs/latest/developer-resources/content-api/content-api.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM good job 🚀
docs/developer-docs/latest/developer-resources/content-api/content-api.md
Outdated
Show resolved
Hide resolved
| **Example request** | ||
| ```js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vuepress uses prismjs and this is their list of supported codes: https://prismjs.com/#supported-languages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tip, @derrickmehaffy ! Honestly I was not too sure about what to use when I was writing, and re-used what we did for Content API.
But looking at the list you shared, http seems more appropriate.
I changed it here and I'll create another PR for other similar code blocks in the repo.
| When creating a localization for existing localized entries, the body of the POST request can only accept localized fields. | ||
| ::: tip TIP | ||
| The Content-Type should have the [`createlocalization` permission](http://localhost:8080/documentation/user-docs/latest/users-roles-permissions/configuring-administrator-roles.md#collection-and-single-types) enabled, otherwise the POST request will return a `403: Forbidden` status. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used a localhost:8080 address here :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, nice catch! 😅 Thanks @derrickmehaffy ! fixed it
|
It shows my comments on the |
|
This pull request has been mentioned on Strapi Community Forum. There might be relevant details there: https://forum.strapi.io/t/content-internationalization-i18n-beta-is-live/3892/50 |
|
This pull request has been mentioned on Strapi Community Forum. There might be relevant details there: https://forum.strapi.io/t/content-internationalization-i18n-beta-is-live/3892/51 |
| A `STRAPI_PLUGIN_I18N_INIT_LOCALE_CODE` [environment variable](/developer-docs/latest/setup-deployment-guides/configurations.md#environment-variables) can be configured to set the initialization locale for your environment. The value used for this variable should be a string (see [full list of available locales](https://github.com/strapi/strapi/blob/features/i18n/packages/strapi-plugin-i18n/constants/iso-locales.json)). | ||
|
|
||
| The value used for this variable should be a string (see [full list of available locales](https://github.com/strapi/strapi/blob/features/i18n/packages/strapi-plugin-i18n/constants/iso-locales.json)). | ||
| This is useful when a Strapi app is deployed in production, with the i18n plugin installed and enabled on your content types for the first time. On a fresh i18n plugin installation, `'en'` is the default locale. So if the database does not contain any locale, and no `STRAPI_PLUGIN_I18N_INIT_LOCALE_CODE` is set for the environment, all the existing content saved in the database will be migrated with the locale defined as `'en'`. But if the `STRAPI_PLUGIN_I18N_INIT_LOCALE_CODE` is defined, then the content will be migrated and set up with this locale. This will prevent from manually updating the locale for every existing content entry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of all the existing content I would have said that the content of the content types with i18n enabled will be auto migrated to the locale. The rest looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alexandrebodin ! I've just updated it :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
What does it do?
* with the Content API
* and with the GraphQL plugin