Example of how to change the website language #1439
-
Hello, is there a way to change the language of the search magnifying glass and the head or "on this page > overview" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey 👋 Starlight UI strings are by default available, at the time of writing, in Arabic, Chinese, Czech, Danish, Dutch, English, French, Galician, German, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Norwegian Bokmål, Persian, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, Ukrainian, and Vietnamese by default (reference to the up-to-date list). If this is one of the languages you want to use and your site is mono-lingual, you can follow this guide to setup a single language site in one of these languages. You will need to set the desired language as the For example, in French, this would be: import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
export default defineConfig({
integrations: [
starlight({
title: 'Ma documentation',
locales: {
root: {
label: 'Français',
lang: 'fr',
},
},
}),
],
}); If your website is multilingual, Starlight provides built-in support for this and can be setup by following this guide. If the language you desire is not listed above, you can follow this guide to add a custom language by providing your own translations. If you have any follow up questions, feel free to ask. |
Beta Was this translation helpful? Give feedback.
Hey 👋
Starlight UI strings are by default available, at the time of writing, in Arabic, Chinese, Czech, Danish, Dutch, English, French, Galician, German, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Norwegian Bokmål, Persian, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, Ukrainian, and Vietnamese by default (reference to the up-to-date list).
If this is one of the languages you want to use and your site is mono-lingual, you can follow this guide to setup a single language site in one of these languages. You will need to set the desired language as the
root
in yourlocales
config (in yourastro.config.mjs
file).For example, in French, this would be: