Locale Config
These options configure locale-related texts.
If your site is served in a different language besides English, you should set these options per locale to provide translations.
Options
stringSpecify the repository label of your project.
This will be used as the text of the repository link, which will be displayed as the last item of the navbar.
If you don't set this option explicitly, it will be automatically inferred from the repo option.
stringSpecify the text of the select language menu.
The select language menu will appear next to the repository button in the navbar when you set multiple locales in your site config.
stringSpecify the aria-label attribute of the select language menu.
This is mainly for a11y purpose.
string'English'Specify the name of the language of a locale.
This option will only take effect inside the locales of your theme config. It will be used as the language name of the locale, which will be displayed in the select language menu.
export default {
locales: {
'/': {
lang: 'en-US',
},
'/zh/': {
lang: 'zh-CN',
},
},
theme: defaultTheme({
locales: {
'/': {
selectLanguageName: 'English',
},
'/zh/': {
selectLanguageName: '简体中文',
},
},
}),
}string | nullSpecify the aria-label value for main navigation in navbar.
string | nullSpecify the aria-label value for next/previous page navigation.
string'Edit this page'Specify the text of the edit this page link.
string'Last Updated'Specify the text of the last updated timestamp label.
string'Contributors'Specify the text of the contributors list label.
string[]['There's nothing here.', 'How did we get here?', 'That's a Four-Oh-Four.', 'Looks like we've got some broken links.']Specify the messages of the 404 page.
The message will be randomly picked from the array when users enter the 404 page.
string'Take me home'Specify the text of the back to home link in the 404 page.
string'toggle color mode'Title text for the color mode toggle button.
This is mainly for a11y purpose.
See also: colorModeSwitch
string'toggle sidebar'Title text for sidebar toggle button.
This is mainly for a11y purpose.
string | false'Prev'Text for the previous page navigation button.
Set to false to disable the previous page navigation button.
string | false'Next'Text for the next page navigation button.
Set to false to disable the next page navigation button.
