# translate

Source: https://zotonic.com/docs/2345/translate

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

Language: en



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

If the input is a `#trans{}` record then it is extended with the translations from the .po files before the language lookup is done. For this the `#trans{}` record *must* have the English translation.

Example with the default language lookup (accessible via the template variable `z_language`):

```django
{{ "Cancel"|translate }}
```

If the current language is `de` then the output is: `"Abbrechen"`.

An example with a specific language:

```django
{{ "Cancel"|translate:"nl" }}
```

The output would be `"Annuleer"`.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2345?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/2345?language=en>)
