List of supported languages of Hugo search module, and describe how to add more.
Language | Code |
---|---|
German | de |
English | en |
French | fr |
Korean | ko |
Malay | ms |
Dutch | nl |
Brazilian Portuguese | pt-br |
Russian | ru |
Simplified Chinese | zh-hans |
Traditional Chinese | zh-hant |
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.
data/search/i18n/en.toml
and naming it with language code, i.e. fr.toml
, ru.toml
.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.