LocaleContext #

The language of the current page and the other languages the visitor can switch to.

Fields #

localeIndexComputedRef<string>

Key of the current locale in locales.

localeComputedRef<LocaleLink | undefined>

The current locale, with its link.

localesComputedRef<LocaleLink[]>

Every locale of the site, with the link to the current page in it.

localeLinksComputedRef<LocaleLink[]>

The same as locales.

Full type signature
TypeScript
interface LocaleContext {
  localeIndex: ComputedRef<string>
  locale: ComputedRef<LocaleLink | undefined>
  locales: ComputedRef<LocaleLink[]>
  localeLinks: ComputedRef<LocaleLink[]>
}

Edit this page

Comments