docs: explains i18n installation (#10963)
Make it clearer that you need to install `@payloadcms/translations`. I think it would help for new people, especially new programmers. --------- Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c31bff7e57
commit
d7dee225fc
@@ -10,7 +10,13 @@ The [Admin Panel](../admin/overview) is translated in over [30 languages and cou
|
|||||||
|
|
||||||
By default, Payload comes preinstalled with English, but you can easily load other languages into your own application. Languages are automatically detected based on the request. If no language is detected, or if the user's language is not yet supported by your application, English will be chosen.
|
By default, Payload comes preinstalled with English, but you can easily load other languages into your own application. Languages are automatically detected based on the request. If no language is detected, or if the user's language is not yet supported by your application, English will be chosen.
|
||||||
|
|
||||||
To configure I18n, use the `i18n` key in your [Payload Config](./overview):
|
To add I18n to your project, you first need to install the `@payloadcms/translations` package:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm install @payloadcms/translations
|
||||||
|
```
|
||||||
|
|
||||||
|
Once installed, it can be configured using the `i18n` key in your [Payload Config](./overview):
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { buildConfig } from 'payload'
|
import { buildConfig } from 'payload'
|
||||||
|
|||||||
Reference in New Issue
Block a user