Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
SalvadorDalia committed Jan 7, 2025
1 parent 3a7b68e commit 9c3d96f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Binary file modified .docs/configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .docs/default-lng.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .docs/translation-lng.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 5 additions & 8 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ Multilingual Plugin is an advanced plugin that allows easy addition and manageme

## Configuration Steps

1. First, select the Content Type.
2. After selecting the Content Type, choose the fields that will be translated. If any field is not selected for translations, it will be disabled on the tab for another language.
3. Add at least two languages and select the default language.
4. After saving the settings, the Content Type is modified and a `__translations` field is added, containing an array of available translations. The translation language is available under the `__language` field in each `__translations` item.
1. First, select the Content Types.
2. Add at least two languages and select the default language.
3. After saving the settings, the Content Types are modified and a `__translations` field is added, containing an array of available translations. The translation language is available under the `__language` field in each `__translations` item.

<img src=".docs/configuration.png" alt="Multilingual plugin configuration" width="700"/>

## Special Fields

* `__translations`: Contains an array of translations, excluding the default language, whose data is found in the object fields.
* `__language`: Specifies the translation language.

If a field is not selected for translations, it will not be visible in the __translations field and will only be available in the basic fields of the object for the default language.
* `__language`: Specifies the translation language. Language is saved in ISO 639 language codes.

> Warning! The __translations field should not be manually modified. After each change in the content type for translated fields, go to the plugin settings and save them again to properly update the translation fields.
Expand Down Expand Up @@ -50,7 +47,7 @@ Let's assume you have an object with `title` and `slug` fields. Before applying
}
```

Now, let's consider you are adding two languages: `pl` and `en`, and your default language is `en`. You are choosing the `title` field to translate. After applying translations, the object will be:
Now, let's consider you are adding two languages: `Poish` and `English`, and your default language is `English`. You are choosing the `title` field to translate. After applying translations, the object will be:

```json
{
Expand Down

0 comments on commit 9c3d96f

Please sign in to comment.