Skip to content
Zotonic
  • Start
  • Cookbook
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Tags
  • Reference
  • Frontend developer
  • Localization and translation
  • Template
  • Render
  • Translated text

trans

See also

tag#trans_ext.

Translate a text value using gettext.

Translate the text contained in the tag into the currently selected language.

Example:

{_ translate me _}

If the active language is “nl” then this will output “vertaal mij”. Of course depending on the available translations.

If a translation is not available then the text is output as-is without any translation.

Edit on GitHub

Related pages

  • trans_ext Translate a text value using gettext and substitute variables. →

Related documentation

Tags

trans_ext

Translate a text value using gettext and substitute variables.

Filters

translate

Translates a (English) value to the current language or the given language.

Developer guide

Translate interface text

Write the source text in English and mark static interface text for translation.

Filters

translated_texts

Check all properties of a map, list or resource. Returns a list of all properties that are translated (have a #trans{} record) and their…

Tags

catcompose

Compose another template based on the category of a resource.

Tags

fragment

Define a named reusable template fragment.

Tags

compose

Compose another template and override its named blocks.

Tags

useblock

Render a named tag#fragment, pass it enclosed body content, and optionally override its named blocks.

Tags

use

Render a named fragment defined with tag#fragment.

GitHub © 2026 Zotonic