Skip to content

Commit 7d255a2

Browse files
Documentation edits made through Mintlify web editor
1 parent 7577bb7 commit 7d255a2

File tree

1 file changed

+40
-5
lines changed

1 file changed

+40
-5
lines changed

translations.mdx

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,46 @@ You can initiate a complete translation from the translations page in your [dash
4848
5. Repeat the process for each language that you want to translate to.
4949

5050
<Info>
51-
An automated translation is stored under a directory named after the [language code](/navigation#languages) that you have selected.
52-
53-
Custom directory names for translations are not supported at this time.
51+
By default, automated translations are stored under a directory named after the [language code](/navigation#languages) that you have selected. However, you can now configure custom directory names for your translations if needed.
5452
</Info>
5553

54+
## Custom Directory Names
55+
56+
You can configure custom directory names for your translations by modifying your `docs.json` file. While the default behavior uses language codes (e.g., `es` for Spanish, `fr` for French), you can specify custom paths for each language.
57+
58+
To configure custom directory names, update your `docs.json` file with custom paths in the languages configuration:
59+
60+
```json
61+
{
62+
"languages": [
63+
{
64+
"name": "English",
65+
"code": "en"
66+
},
67+
{
68+
"name": "Español",
69+
"code": "es",
70+
"path": "spanish"
71+
},
72+
{
73+
"name": "Français",
74+
"code": "fr",
75+
"path": "french"
76+
}
77+
]
78+
}
79+
```
80+
81+
In this example:
82+
- Spanish translations will be stored in a `spanish/` directory instead of `es/`
83+
- French translations will be stored in a `french/` directory instead of `fr/`
84+
- English (the base language) doesn't require a custom path
85+
86+
You can use any valid directory name for your custom paths, such as:
87+
- Full language names: `spanish`, `french`, `german`
88+
- Regional variants: `spanish-mx`, `english-uk`
89+
- Custom naming schemes: `docs-es`, `content-fr`
90+
5691
## Ongoing Translations
5792

5893
After adding a translation to your `docs.json` file, any future changes to your documentation are automatically translated as long as you maintain a subscription to the translation add-on for your configured languages.
@@ -61,7 +96,7 @@ The ongoing translation process follows this sequence:
6196

6297
1. A member of your organization makes changes to the documentation in your repository.
6398
2. When the changes are pushed or merged into your main branch, the ongoing translation job is triggered.
64-
3. The translation job updates, removes, or creates the required files in all subscribed languages based on your `docs.json` file.
99+
3. The translation job updates, removes, or creates the required files in all subscribed languages based on your `docs.json` file configuration, using either the default language code directories or your custom directory names.
65100
4. The translation job creates a separate branch and pull request containing the translated changes for your review.
66101

67102
<Info>
@@ -121,4 +156,4 @@ We recommend promptly reviewing and merging translation pull requests so that yo
121156
<Accordion title="Can I define specific translations for words or prevent terms from being translated?">
122157
The translation service does not support custom translation rules for specific terms or phrases. We are developing this feature for a future release.
123158
</Accordion>
124-
</AccordionGroup>
159+
</AccordionGroup>

0 commit comments

Comments
 (0)