# trans

Source: https://zotonic.com/docs/1380/trans

URI: https://zotonic.com/id/1380

Language: en



::: {.aside}
See also

<a href="/id/doc_template_tag_tag_trans_ext" class="doc-reference doc-reference-tag"><code>tag#trans_ext</code></a>.
:::

Translate a text value using gettext.

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

Example:

```django
{_ 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.

This tag and translated literals such as `_"Open"` inherit the template's <a href="/id/doc_template_tag_tag_msgctxt" class="doc-reference doc-reference-tag"><code>tag#msgctxt</code></a> declaration or enclosing <a href="/id/doc_template_tag_tag_with_msgctxt" class="doc-reference doc-reference-tag"><code>tag#with_msgctxt</code></a> scope. For a single message override, use `{% trans "Open" msgctxt="action" %}`.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1380?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1380?language=en>)
