You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: translations.mdx
+40-5Lines changed: 40 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,11 +48,46 @@ You can initiate a complete translation from the translations page in your [dash
48
48
5. Repeat the process for each language that you want to translate to.
49
49
50
50
<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.
54
52
</Info>
55
53
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
+
56
91
## Ongoing Translations
57
92
58
93
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:
61
96
62
97
1. A member of your organization makes changes to the documentation in your repository.
63
98
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.
65
100
4. The translation job creates a separate branch and pull request containing the translated changes for your review.
66
101
67
102
<Info>
@@ -121,4 +156,4 @@ We recommend promptly reviewing and merging translation pull requests so that yo
121
156
<Accordiontitle="Can I define specific translations for words or prevent terms from being translated?">
122
157
The translation service does not support custom translation rules for specific terms or phrases. We are developing this feature for a future release.
0 commit comments