To leverage multi-language support in VuePress, you first need to use the following file structure:
```
/
├─ README.md
├─ foo.md
├─ /nested/
│ └─ README.md
└─ /zh/
├─ README.md
├─ foo.md
└─ /zh/nested/
└─ README.md
```
Then, specify the `locales` option in `.vuepress/config.js`:
``` js
module.exports={
locales:{
// The key is the path for the locale to be nested under.
// As a special case, the default locale can use '/' as its path.
'/':{
lang:'en-US',// this will be set as the lang attribute on <html>
title:'VuePress',
description:'Vue-powered Static Site Generator'
},
'/zh/':{
lang:'zh-CN',
title:'VuePress',
description:'Vue 驱动的静态网站生成器'
}
}
}
```
If a locale does not have `title` or `description` VuePress will fallback to the root level values. You can omit the root level `title` and `description` as long as they are provided in each locale.
## Default Theme i18n Config
The default theme also has built-in i18n support via `themeConfig.locales`, using the same `{ path: config }` format. Each locale can have its own [nav](../default-theme-config/#navbar-links) and [sidebar](../default-theme-config/#sidebar) config, in addition to a few other text values used across the site: