Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 40 additions & 5 deletions translations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,46 @@
5. Repeat the process for each language that you want to translate to.

<Info>
An automated translation is stored under a directory named after the [language code](/navigation#languages) that you have selected.

Custom directory names for translations are not supported at this time.
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.
</Info>

## Custom Directory Names

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.

To configure custom directory names, update your `docs.json` file with custom paths in the languages configuration:

```json
{
"languages": [
{
"name": "English",
"code": "en"
},
{
"name": "Español",
"code": "es",
"path": "spanish"

Check warning on line 70 in translations.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

translations.mdx#L70

Did you really mean 'spanish'?
},
{
"name": "Français",
"code": "fr",
"path": "french"
}
]
}
```

In this example:
- Spanish translations will be stored in a `spanish/` directory instead of `es/`
- French translations will be stored in a `french/` directory instead of `fr/`
- English (the base language) doesn't require a custom path

You can use any valid directory name for your custom paths, such as:
- Full language names: `spanish`, `french`, `german`
- Regional variants: `spanish-mx`, `english-uk`
- Custom naming schemes: `docs-es`, `content-fr`

## Ongoing Translations

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.
Expand All @@ -61,7 +96,7 @@

1. A member of your organization makes changes to the documentation in your repository.
2. When the changes are pushed or merged into your main branch, the ongoing translation job is triggered.
3. The translation job updates, removes, or creates the required files in all subscribed languages based on your `docs.json` file.
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.
4. The translation job creates a separate branch and pull request containing the translated changes for your review.

<Info>
Expand Down Expand Up @@ -121,4 +156,4 @@
<Accordion title="Can I define specific translations for words or prevent terms from being translated?">
The translation service does not support custom translation rules for specific terms or phrases. We are developing this feature for a future release.
</Accordion>
</AccordionGroup>
</AccordionGroup>