{"result":{"depiction_url":null,"edges":{"refers":{"objects":[{"created":"2026-09-09T13:48:28Z","object_id":{"id":1380,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_trans","title":"trans","uri":"https:\/\/zotonic.com\/id\/1380"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"relation":{"objects":[{"created":"2020-05-30T05:47:52Z","object_id":{"id":1380,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_trans","title":"trans","uri":"https:\/\/zotonic.com\/id\/1380"},"seq":1000000}],"predicate":{"id":303,"is_a":["meta","predicate"],"name":"relation","title":{"_type":"trans","tr":{"nl":"Relatie","en":"Relation"}},"uri":"http:\/\/purl.org\/dc\/terms\/relation"}},"subject":{"objects":[{"created":"2026-09-09T13:48:28Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:48:28Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-09T13:48:28Z","object_id":{"id":2588,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_localization_and_translation","title":"Localization and translation","uri":"https:\/\/zotonic.com\/id\/2588"},"seq":3},{"created":"2026-09-09T13:48:28Z","object_id":{"id":2620,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_template","title":"Template","uri":"https:\/\/zotonic.com\/id\/2620"},"seq":4},{"created":"2026-09-09T13:48:28Z","object_id":{"id":2641,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_render","title":"Render","uri":"https:\/\/zotonic.com\/id\/2641"},"seq":5},{"created":"2026-09-09T13:48:28Z","object_id":{"id":2669,"is_a":["categorization","keyword","keyword_data_type"],"name":"zotonic_topic_translated_text","title":"Translated text","uri":"https:\/\/zotonic.com\/id\/2669"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1381,"is_a":["text","documentation","reference","template_tag"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1381"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_template_tag_tag_trans_ext","page_url":{"en":"https:\/\/zotonic.com\/docs\/1381\/trans_ext","x-default":"https:\/\/zotonic.com\/docs\/1381\/trans_ext"},"preview_url":null,"resource":{"version":4055,"pivot_location_lat":null,"title":"trans_ext","is_authoritative":true,"body":"<aside><p>See also<\/p><p><a href=\"\/id\/doc_template_tag_tag_trans\" class=\"doc-reference doc-reference-tag\"><code>tag#trans<\/code><\/a>.<\/p><\/aside>\n<p>Translate a text value using gettext and substitute variables.<\/p>\n<p>Example:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{% trans &quot;Hello {foo} World&quot; foo=1234 %}\n<\/code><\/pre>\n<p>This translates the text using the available po files. The variables in the translated text will be substituted with the value of the arguments.<\/p>\n<p>If the active language is “en” then the example above will output “Hello 1234 World”, in “nl” it will be “Hallo 1234 wereld”. Of course depending on the available translations.<\/p>\n<p>If a translation is not available then the text is output as-is without any translation.<\/p>\n<p>If a “{” is needed in the string, then repeat it:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{% trans &quot;Hello {{foo}}, and this is {foo}.&quot; foo=1234 %}\n<\/code><\/pre>\n<p>Will echo “Hello {foo}, and this is 1234.”<\/p>","slug":"trans_ext","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"addec3b0197a0c3b4538f876995084aac8aba9b6daed956763d96b20a683f82f","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":324,"is_a":["meta","category"],"name":"template_tag","title":"Tags","uri":"https:\/\/test.zotonic.com\/id\/324"},"doc_source_path":"doc\/template-tags\/trans_ext.md","publication_start":"2023-06-24T08:17:47Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/doc\/template-tags\/trans_ext.md","pivot_location_lng":null,"doc_source_kind":"template_tag","name":"doc_template_tag_tag_trans_ext","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:20Z","uri":null,"doc_status":"current","is_dependent":false,"publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"c34f80c7ab6700e5d77ac5730deaae0e4710e159\n","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-19T13:18:45Z","title_slug":"trans_ext"},"uri":"https:\/\/zotonic.com\/id\/1381","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1381"}},"status":"ok"}