feat: add translation support (#2870)
* feat: add translation support * test(cypress): fix locale import * docs: add locale documentation * feat: add german translation (#2877) * fix: locales package version, register all locales in netlify-cms
This commit is contained in:
@ -120,6 +120,35 @@ When the `logo_url` setting is specified, the CMS UI will change the logo displa
|
||||
logo_url: https://your-site.com/images/logo.svg
|
||||
```
|
||||
|
||||
## Locale
|
||||
|
||||
The CMS locale.
|
||||
|
||||
Defaults to `en`.
|
||||
|
||||
Other languages than English must be registered manually.
|
||||
|
||||
**Example**
|
||||
|
||||
In your `config.yml`:
|
||||
|
||||
```yaml
|
||||
locale: 'de'
|
||||
```
|
||||
|
||||
And in your custom JavaScript code:
|
||||
|
||||
```js
|
||||
import CMS from 'netlify-cms-app';
|
||||
import { de } from 'netlify-cms-locales';
|
||||
|
||||
CMS.registerLocale('de', de);
|
||||
```
|
||||
|
||||
When a translation for the selected locale is missing the English one will be used.
|
||||
|
||||
> When importing `netlify-cms` all locales are registered by default (so you only need to update your `config.yml`).
|
||||
|
||||
## Show Preview Links
|
||||
|
||||
[Deploy preview links](../deploy-preview-links) can be disabled by setting `show_preview_links` to `false`.
|
||||
|
Reference in New Issue
Block a user