> For the complete documentation index, see [llms.txt](https://wplake.gitbook.io/advanced-views/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wplake.gitbook.io/advanced-views/post-selections/features/string-translations.md).

# String translations

In Advanced Views, [*Post Selections*](/advanced-views/getting-started/first-post-selection.md) support native WordPress translation out of the box.

## 1. Multilingual *Post Selection*

Advanced Views **automatically** applies the built-in WordPress translation function for all *Post Selection* labels, creating calls like this one: `__('field label', 'yourThemeTextDomain')`

It allows you to translate labels seamlessly using your preferred multilingual plugin, eliminating the need for creating a separate *Post Selection* for every language.

{% hint style="info" %}
'`yourThemeTextDomain`' will be picked up automatically, based on the Text Domain defined in the heading of the **style.css** file of your current theme.
{% endhint %}

#### Theme "Text Domain" requirement

Advanced Views utilizes WordPress's built-in multilingual capabilities, and in order to translate strings within *Post Selections*, your theme must define the "Text Domain" in the [theme's style.css file](https://developer.wordpress.org/themes/basics/main-stylesheet-style-css/).

{% hint style="info" %}
If you are using a pre-built theme, no action is required on your part. However, if you are using a custom theme or a custom child theme, open the **style.css** file in the root folder and ensure that the "Text Domain" is defined in the header. \
If it is missing, add it in the format "Text Domain: x," where x can be your own name (with dashes as delimiters) or the same value as your parent theme.
{% endhint %}

## 2. Automatic label e**xposure**

While the multilingual string translation works out-of-the-box, by default, there is no 'labels list' in your theme, and your translation tool will require 'registering/entering' each string manually.

To streamline this process, you can activate the [File Storage feature](/advanced-views/features/file-system-storage.md). When enabled, during the *Post Selection* saving process, Advanced Views automatically deposits the labels into special files.&#x20;

It enables the use of the 'scan' feature in your translation tool, automatically loading all labels for efficient translation.

## 3. Multilingual templates

Multilingual capabilities extend to the [smart templates](/advanced-views/features/smart-templates.md) as well.

{% hint style="info" %}
Upon saving *Post Selection*, Advanced Views will scan all these translation calls and interact with them in the same manner as with the labels from the UI, described above.
{% endhint %}

#### Vanilla PHP

```php
<?= __("my-string", "yourThemeTextDomain") ?>
```

#### Blade

Blade allows you to call any PHP functions, so you can translate any string by calling the [WordPress translate (\_\_) function](https://developer.wordpress.org/reference/functions/__/)::

```blade
{{ __("my-string", "yourThemeTextDomain") }}
```

#### Twig

To translate labels within your Twig template, employ our [translation function](/advanced-views/features/smart-templates/twig-templates.md#our-functions).

```twig
{{ __("my-string", "yourThemeTextDomain") }} 
```
