Translations
Use labels and locale to customize Retype's built-in UI text, including search labels, table of contents labels, next and previous buttons, callout titles, and much more.
The default values for all supported languages are available in the retype-translations project.
How labels work
The table of
If you see a label in your project that you want to customize, check the table below to find the corresponding key.
Label key lookup is case-insensitive and treats _ and - as equivalent. For example, Search_Input_Placeholder and search_input_placeholder and search-input-placeholder are all treated as the same key.
Label collections are also case-insensitive, so fr and FR refer to the collection of keys. In this case, French language translations.
Default labels
Use labels.default to set project-wide fallback values and to override the English defaults.
labels:
default:
search_input_placeholder: Search the docs
toc_contents_label: On this page
Locale-specific labels
When locale is set to a supported built-in locale such as fr, Retype loads the built-in translated strings for that locale and then applies any matching labels.<locale> overrides.
locale: fr
labels:
default:
toolbar_filter_placeholder: Filter docs
fr:
search_input_placeholder: Rechercher dans la documentation
toc_contents_label: Sur cette page
One subtle point matters here: labels.default does not automatically replace built-in non-English translations. If a supported locale already has a built-in translated value, that value remains in use unless you override the same key in labels.<locale>.
Custom groups
You can also set locale to a custom value and provide a matching group in labels. This is useful for partner portals, internal docs, or branded variants that need wording different from the built-in locales.
locale: partner
labels:
default:
search_input_placeholder: Search docs
partner:
search_input_placeholder: Search partner docs
toc_contents_label: In this section
With a custom locale, Retype uses the matching collection as the active locale source and falls back to labels.default when needed.
Template access
Using the template syntax, all label values are available from the project.labels object.
The following sample demonstrates how to get the label value for a specific key:
{{ project.labels["Search_NoResults_Label"] }}
The above outputs the value: Sorry, no results found.
You can also access a specific locale using the following syntax:
{{ project.labels.fr["Search_NoResults_Label"] }}
The above outputs the value: Désolé, aucun résultat trouvé.
Keys
The following table lists all the keys and default values that can be customized in a Retype project. The es (Spanish) values are also provided for reference.