Advanced

Internationalization

Translate every UI string with one YAML file.

3 min

Every UI string in the theme — “Previous”, “Next”, “On this page”, “Search workshops…”, and 40 more — lives in i18n/en.yaml. Translate by adding a sibling file.

Adding a translation

Drop a new file at i18n/<lang>.yaml in your site (or in the theme), copying i18n/en.yaml and translating each value:

yaml
# i18n/de.yaml — German
- id: home
  translation: "Startseite"
- id: previous
  translation: "Zurück"
- id: next
  translation: "Weiter"
- id: onThisPage
  translation: "Auf dieser Seite"
- id: searchPlaceholder
  translation: "Workshops durchsuchen…"
# … etc.

Then in your hugo.toml:

toml
defaultContentLanguage = "de"

Or for a multilingual site, configure both:

toml
defaultContentLanguage = "en"

[languages]
  [languages.en]
    title = "Splunk Workshops"
    weight = 1
  [languages.de]
    title = "Splunk Werkstätten"
    weight = 2
    languageName = "Deutsch"

See Hugo’s multilingual docs for the content-side setup (per-language markdown files, language switching, etc.).

All translation keys

The theme uses these keys. If you add a new key in your custom partial, add it to every language file you ship.

KeyEnglish
homeHome
workshopsWorkshops
previousPrevious
nextNext
onThisPageOn this page
skipToContentSkip to content
editOnGitHubEdit this page on GitHub
searchPlaceholderSearch workshops…
searchHintPress / to search
searchEmptyNo matches
pagesCount(plural) {{ .Count }} page(s)
presenterNotePresenter Note
copyCodeCopy
copiedCopied
chapterChapter
completedCompleted
acknowledgeAcknowledge
acknowledgeDefaultPlease acknowledge
iUnderstandI understand
notFoundTitleThis page has no trace.
notFoundEyebrow404 · No span found
notFoundLeadWe searched every metric, log, and span for this URL — nothing matched. The workshops list, however, is well-instrumented.
notFoundQueryLabelquery
notFoundResultLabelresult
notFoundResultValue0 events in the last 30 days
takeMeHomeTake me home
browseWorkshopsBrowse workshops
viewOnGitHubView on GitHub
builtWithHugoBuilt with Hugo
themeTheme
openMenuOpen menu

The notFound* keys drive the observability-themed 404 page: notFoundEyebrow is the small label above the title, and notFoundQueryLabel / notFoundResultLabel / notFoundResultValue label the fake-query result panel that echoes the visitor’s path back as a search that returned nothing. Override them to retheme or translate the 404 page without forking the template.

A few callout-related keys (tip, note, warning, etc.) exist but are mostly used as default titles — overriding them in a translation only matters if you also use the notice shortcode without an explicit title.

The full list lives in i18n/en.yaml.

Pluralization

The pagesCount key uses Hugo’s plural form:

yaml
- id: pagesCount
  translation:
    one:   "{{ .Count }} page"
    other: "{{ .Count }} pages"

In templates:

go-html-template
{{ i18n "pagesCount" (dict "Count" 5) }}
{{/* renders: "5 pages" */}}

Languages with more complex plural rules (Russian, Polish, Arabic) get additional CLDR forms (few, many, zero). Hugo handles them; the YAML structure just expands:

yaml
- id: pagesCount
  translation:
    one:   "{{ .Count }} страница"
    few:   "{{ .Count }} страницы"
    many:  "{{ .Count }} страниц"
    other: "{{ .Count }} страниц"

RTL languages

For right-to-left languages (Arabic, Hebrew):

  1. Create i18n/ar.yaml.
  2. In your site’s hugo.toml, set [languages.ar] languagedirection = "rtl".
  3. The theme doesn’t ship dedicated RTL CSS yet, but the layout flips reasonably under dir="rtl". PR welcome if you want to polish RTL handling.
Last Modified ·