Localization
1 minute read
Duckling ships with a localization system based on one used in tabi, which is easy to use and flexible at the same time.
To add a translation, simply create a file in your site’s i18n
directory called LANG_CODE.toml
, e.g fr.toml
. The language code should be either ISO 639-1 or BCP 47.
Inside that file, copy-paste the English translation from Duckling and adapt it to your needs. You can also check tabi translation files for reference.
Additionally to translating Duckling, you can override the English strings by providing a en.toml
file.