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 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

Translation

Many sites need to support content and templates in multiple languages. Luckily, Zotonic is completely multilingual, out of the box.

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

fragment

Define a named reusable template fragment.

Tags

use

Render a named fragment defined with tag#fragment.

Tags

catcompose

Compose another template based on the category of a resource.

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.

GitHub © 2026 Zotonic