Skip to content

locale-nav.ts#

View Markdown

Source

3 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

3 symbols 2 functions 1 modules 4 parameters 2 returns

Reference#

modulelocale-navRewrites default-theme nav hrefs to the current locale sibling when it exists.

Rewrites default-theme nav hrefs to the current locale sibling when it exists.

View source

fnlocalizeHeaderNavItems(items: HeaderNavItem[] | undefined, options: LocalizeNavOptions): HeaderNavItem[] | undefinedResolves header labels and rewrites link values the same way as the sidebar.

Resolves header labels and rewrites link values the same way as the sidebar.

Signature

export function localizeHeaderNavItems(items: HeaderNavItem[] | undefined, options: LocalizeNavOptions): HeaderNavItem[] | undefined

View source

Parameters

Returns

HeaderNavItem[] | undefined
fnlocalizeNavGroups<T extends LocalizableNavGroup>(groups: T[], options: LocalizeNavOptions): T[]Resolves authored sidebar label maps and prefixes hrefs/paths with the current…

Resolves authored sidebar label maps and prefixes hrefs/paths with the current locale when that page exists. Missing siblings stay as authored.

Signature

export function localizeNavGroups<T extends LocalizableNavGroup>(groups: T[], options: LocalizeNavOptions): T[]

View source

Parameters

  • groups T[]
  • options LocalizeNavOptions

Returns

T[]