Advanced
Internationalization
Translate every UI string with one YAML file.
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:
# 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:
defaultContentLanguage = "de"Or for a multilingual site, configure both:
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.
| Key | English |
|---|---|
home | Home |
workshops | Workshops |
previous | Previous |
next | Next |
onThisPage | On this page |
skipToContent | Skip to content |
editOnGitHub | Edit this page on GitHub |
searchPlaceholder | Search workshops… |
searchHint | Press / to search |
searchEmpty | No matches |
pagesCount | (plural) {{ .Count }} page(s) |
presenterNote | Presenter Note |
copyCode | Copy |
copied | Copied |
chapter | Chapter |
completed | Completed |
acknowledge | Acknowledge |
acknowledgeDefault | Please acknowledge |
iUnderstand | I understand |
notFoundTitle | This page has no trace. |
notFoundEyebrow | 404 · No span found |
notFoundLead | We searched every metric, log, and span for this URL — nothing matched. The workshops list, however, is well-instrumented. |
notFoundQueryLabel | query |
notFoundResultLabel | result |
notFoundResultValue | 0 events in the last 30 days |
takeMeHome | Take me home |
browseWorkshops | Browse workshops |
viewOnGitHub | View on GitHub |
builtWithHugo | Built with Hugo |
theme | Theme |
openMenu | Open 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:
- id: pagesCount
translation:
one: "{{ .Count }} page"
other: "{{ .Count }} pages"In templates:
{{ 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:
- id: pagesCount
translation:
one: "{{ .Count }} страница"
few: "{{ .Count }} страницы"
many: "{{ .Count }} страниц"
other: "{{ .Count }} страниц"RTL languages #
For right-to-left languages (Arabic, Hebrew):
- Create
i18n/ar.yaml. - In your site’s
hugo.toml, set[languages.ar] languagedirection = "rtl". - 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.
