Skip to content

Commit d28ab97

Browse files
Brandon WaselnukBrandon Waselnuk
authored andcommitted
added localization setup details to versioning page
1 parent 89c4a1a commit d28ab97

File tree

2 files changed

+47
-9
lines changed

2 files changed

+47
-9
lines changed

settings/global.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ Japanese, and Portuguese.
313313
</Info>
314314

315315
For more information, please refer to our
316-
[versioning documentation](/settings/versioning).
316+
[versioning & localization documentation](/settings/versioning).
317317

318318
Example:
319319

settings/versioning.mdx

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
---
2-
title: 'Versioning'
3-
description: 'Build separate versions'
2+
title: 'Versioning & Localization'
3+
description: 'Build separate versions or localizations'
44
icon: 'square-chevron-down'
55
---
66

7+
Mintlify supports versioning or localization. You can use one or the other, not both.
8+
79
These guides will assume `v1` pages are in a folder named `v1`, `v2` pages are in a folder named `v2`, and so on. While this method of structuring your files isn't strictly necessary, it's a great way to keep your files organized.
810

9-
## Setup
11+
## Versioning
12+
13+
### Setup
1014

1115
Add `"versions": ["v2", "v1"]` to your `mint.json` file where `v1` and `v2` are the names of your versions. You can put any number of versions in this array. The first version from the array serves as the default version.
1216

@@ -26,7 +30,7 @@ If you would like to specify a default version, you can do so like this:
2630
`mint.json`.
2731
</Tip>
2832

29-
## Versioning Groups and Pages
33+
### Versioning Groups and Pages
3034

3135
The best way to specify page versions is by adding a version value to a group in the navigation. When you specify the version of a group, that version is applied to all pages within that group.
3236

@@ -55,7 +59,7 @@ version: 'v2'
5559
While it is possible to nest versioned groups within versioned groups, it is not recommended. If you do take this approach, the more deeply-nested version takes precedence.
5660
</Warning>
5761

58-
### Versioning Tabs and Anchors
62+
#### Versioning Tabs and Anchors
5963

6064
You can hide a tab or anchor based on a version. This is useful if you have links that are only relevant in one version. Importantly, this does **not** apply the version to the pages within that anchor.
6165

@@ -102,15 +106,15 @@ In `mint.json`, simply add `version` to your tab or anchor. Tabs and anchors wit
102106
```
103107
</CodeGroup>
104108

105-
### Sharing Between Versions
109+
#### Sharing Between Versions
106110

107111
Not _all_ content has to be hidden though! Any content without a specified version appears in every version so you don't have to duplicate content!
108112

109113
<Tip>
110114
When using localization with versioning, each version can have its own set of translations. This means you can have different language versions for different API versions, giving you full flexibility in managing both versioned and localized content.
111115
</Tip>
112116

113-
## Troubleshooting
117+
### Troubleshooting
114118

115119
Common errors and how to fix them
116120

@@ -126,4 +130,38 @@ Common errors and how to fix them
126130
navigation, make sure you spelled the version the same as in your `versions`
127131
array in `mint.json`.
128132
</Accordion>
129-
</AccordionGroup>
133+
</AccordionGroup>
134+
135+
## Localization
136+
137+
### Setup
138+
139+
Using `"versions"` in your `mint.json` file where `en`, `fr`, and `es` are the names of your localizations. The first localization from the array serves as the default localization.
140+
141+
We currently support localization in English, Chinese, Spanish, French, Japanese, and Portuguese.
142+
143+
Set your localization in your `mint.json` file like this:
144+
145+
```json
146+
"versions": [
147+
{
148+
"name": "English",
149+
"locale": "en",
150+
},
151+
{
152+
"name": "French",
153+
"locale": "fr",
154+
},
155+
{
156+
"name": "Spanish",
157+
"locale": "es"
158+
}
159+
]
160+
```
161+
162+
<Tip>
163+
The versions dropdown will show your localizations in the order you include them in
164+
`mint.json`.
165+
</Tip>
166+
167+
Once setup, the rest of localization is handled by the versioning setup described above.

0 commit comments

Comments
 (0)