Language selector

Askr 0.10.0 adds an optional site language selector through askr.languages. Askr places the current-tab links in a Header control beside the theme and other tools. The control stays in the Header on narrow screens, independently of Areas. With no configuration, Askr adds no language control and all other defaults remain unchanged.

Configure languages

Set current to the code for this language project’s pages. Each entry provides a unique code, display label and exact destination href:

askr:
  languages:
    current: zh-TW
    items:
      - code: zh-TW
        label: 繁體中文
        href: https://docs.example.org/
      - code: en
        label: English
        href: https://docs.example.org/en/

Provide at least two entries. Codes and labels must be nonempty scalar values, and codes must be unique. Each href must be an absolute HTTPS URL or a domain-root path such as /en/; protocol-relative paths such as //other.org and destinations containing whitespace are rejected during rendering. Set current explicitly in each language project’s configuration; Askr does not infer it from the current URL.