> For the complete documentation index, see [llms.txt](https://docs.devhub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devhub.com/themes-and-custom-templates/advanced-examples/content-translations.md).

# Content translations

Below is how you can wrap a word, phrase or piece of content to enable translation when working on multi-lingual Sites and Templates.

```markup
<p>{% translate %}Hello World{% endtranslate %}</p>
```

In this case, the "Hello World" phrase is in the default language (normally english). When viewing a Site that has it's language set other than the default language, if a matching translation for the phrase if found it will display that. If no match is found, the default "Hello World" would be displayed.

Since the default text will display as a fallback, it does not hurt to add the \`

\` tags as needed, even if the translations are not ready yet.

## Variable Translations

You can access directly a function if you want to translate a phrase that is coming from a variable.

```markup
{% set translate_string = "Hello World" %}
<p>{{ do_translate(translate_string) }}</p>
```
