Translate interface text
Write the source text in English and mark static interface text for translation.
Write the source text in English and mark static interface text for translation.
<button type="submit">{_ Save changes _}</button>
Use a translated argument when passing text into an include, for example title=_"Latest news".
Generate the site's POT file when you are updating translations, then merge it into the PO files and translate the new messages. Validate changed PO files with msgfmt --check. Test a second language in the browser, including links and form errors.
Extract translation messages
After changing translatable template text in a site, generate its message catalog:
bin/zotonic pot garden
This connects to the running node and writes translation source files. Use pot zotonic only when intentionally updating the core catalogs according to the project's contribution workflow.
Review the resulting POT changes, merge them into the appropriate PO files, and translate new messages. Validate a PO file with gettext tooling:
msgfmt --check --output-file=/dev/null path/to/language.po
Check both the interface text and the selected content language in the browser. See Translate interface text.
Add a language and choose its availability
Access needed: Site administrator allowed to manage languages.
- Open Structure → Translation and choose Add language.
- Select the intended language and use Editable while preparing its content.
- Ask editors to translate the main pages, menu labels, and essential messages.
- Check a representative page in that language and verify fallback behaviour for missing translations.
- Set the language to View when it should be available to visitors.
- Check the language order: the first View language is the default. Test the language switcher and incoming links.
This example shows English as the first View language and Arabic as Editable. Use the drag handles to change the preference order.
Changing the default can affect URLs and what new visitors see. Check redirects and search-facing links with the developer before a major language change.
Use Editable when hiding a language while retaining an editing workflow. The Off option is not an archive switch: the admin warns that subsequent edits can lose translations for an off language. Preserve needed translations before disabling it.