Skip to content

Commit bbdb431

Browse files
committed
fix: add master json and export/import info
1 parent 29610f9 commit bbdb431

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

content/docs/platform/workflow/translations.mdx

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,42 @@ You can update translations by editing the JSON files in the editor on the trans
7777
7878
## Exporting and importing translations
7979
80+
If you prefer to create/update translations in a JSON file outside of the Novu dashboard, you can do so by exporting and importing them.
81+
8082
### Export
8183
82-
- Navigate to the Translations section.
83-
- Click **Export en_US.json** to download the latest default file.
84-
- Use this as a base for other translations.
84+
- Navigate to the translations page.
85+
- Select the workflow you want to export translations for.
86+
- Click on the locale, such as `en_US`, now click on the download icon to download the latest default locale translation JSON file.
8587
8688
### Import
8789
88-
- Click **Import locale(s)**.
89-
- Upload JSON files (e.g., fr_FR.json, es_ES.json).
90-
- Novu detects the locale automatically.
90+
- Navigate to the translations page.
91+
- Select the workflow you want to import translations for.
92+
- Click on the locale, such as `en_US`, now click on the **Import Language(s)** button to upload the translation JSON file.
93+
- Novu detects the locale automatically using the file name
94+
95+
💡 Translation changes in default locale such as `en_US` will mark other locales as *Outdated, needs update*
96+
97+
### Master JSON file
98+
99+
Master JSON file is a JSON file that contains the default locale' translations keys of all the workflows where translations are enabled. You can import or export this file from the translations page. Below is an example of a master JSON file:
100+
101+
```json
102+
{
103+
"workflows": {
104+
"events-publish": {
105+
"key": "value"
106+
},
107+
"events-update": {
108+
"subject": "A new update",
109+
"content": "{{payload.eventName}} event has been updated"
110+
}
111+
}
112+
}
113+
```
91114

92-
💡 Translation changes in default locale (e.g., en_US) will mark other locales as *Outdated, needs update*
115+
![Master JSON file export and import options](/images/platform/workflow/translations/translations_master_json_file.png)
93116

94117
## Using translation keys in step content editor
95118

@@ -109,7 +132,7 @@ Example:
109132

110133
Use the Preview Context to:
111134

112-
- Simulate subscriber locale (e.g., fr_FR or ru_RU).
135+
- Simulate subscriber locale such as `fr_FR` or `ru_RU`
113136
- Preview step content for the selected language.
114137
- Update or correct missing translations on the fly.
115138

436 KB
Loading

0 commit comments

Comments
 (0)