Internationalization

List of supported languages of Hugo search module, and describe how to add more.

Supported Languages

LanguageCode
Germande
Englishen
Frenchfr
Koreanko
Malayms
Dutchnl
Brazilian Portuguesept-br
Russianru
Simplified Chinesezh-hans
Traditional Chinesezh-hant

How to Add Language?

The translations are stored in the data/search/i18n folder, it’s different from Hugo i18n, since the module using JS instead of templates to render the HTML markup.

  1. Fork and clone the repository.
  2. Copy the data/search/i18n/en.toml and naming it with language code, i.e. fr.toml, ru.toml.
  3. Translate the items.
  4. Create a pull request.

Customize I18n Translations

Let’s take the input_placeholder as an example, just create the corresponding translations file under your project’s root.

1# data/search/i18n/en.toml
2[input_placeholder]
3other = "SEARCH INPUT PLACEHOLDER"

Now, the input_placeholder will be SEARCH INPUT PLACEHOLDER in en sites.

All the available translations’ keys can be found at data/search/i18n folder.