Skip to content

Internationalization (i18n)

starlightViewModes.switchTo

Starlight View Modes relies on Starlight’s built-in support for internationalization to provide multilingual support. Follow the Starlight “Configure i18n” guide and the Starlight View Modes plugin will automatically create your internationalized routes and pages.

Translate the view modes UI

The Starlight View Modes plugin allows you to translate the default UI strings used in the view modes so that your website can be fully localized and readers can enjoy a seamless experience in their preferred language.

Chinese, English, French, German, Italian, Korean, Portuguese, Russian, and Spanish translated UI strings are provided out of the box.

To provide translations for additional languages you support — or override the default ones — check the “Translate Starlight’s UI” guide in the Starlight documentation.

These are the English defaults of the existing strings Starlight View Modes ships with:

{
"starlightViewModes.switchesHeading": "View Modes",
"starlightViewModes.defaultMode.title": "Normal Mode",
"starlightViewModes.zenMode.title": "Zen Mode",
"starlightViewModes.switchToDefaultMode": "Switch to normal mode",
"starlightViewModes.switchToZenMode": "Switch to Zen Mode"
}