Minor Changes
-
#1923
5269aad
Thanks @HiDeoo! - Overhauls the built-in localization system which is now powered by thei18next
library and available to use anywhere in your documentation website.See the “Using UI translations” guide to learn more about how to access built-in UI labels or your own custom strings in your project. Plugin authors can also use the new
injectTranslations()
helper to add or update translation strings.⚠️ BREAKING CHANGE: The
Astro.props.labels
props has been removed from the props passed down to custom component overrides.If you are relying on
Astro.props.labels
(for example to read a built-in UI label), you will need to update your code to use the newAstro.locals.t()
helper instead.--- import type { Props } from '@astrojs/starlight/props'; // The `search.label` UI label for this page’s language: const searchLabel = Astro.locals.t('search.label'); ---
-
#2285
7286220
Thanks @HiDeoo! - Adds support for translating sidebar badges. -
#1923
5269aad
Thanks @HiDeoo! - ⚠️ BREAKING CHANGE: The minimum supported version of Astro is now 4.14.0Please update Astro and Starlight together:
npx @astrojs/upgrade