String translations
In Advanced Views, Layouts support native WordPress translation out of the box.
1. Multilingual Layout
Advanced Views automatically applies the built-in WordPress translation function for all Layout 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 Layout for every language.
Theme "Text Domain" requirement
Advanced Views utilizes WordPress's built-in multilingual capabilities, and in order to translate strings within Layout, your theme must define the "Text Domain" in the theme's style.css file.
2. Automatic label exposure
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. When enabled, during the Layout saving process, Advanced Views automatically deposits the labels into special files.
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 as well.
Vanilla PHP
Blade
Blade allows you to call any PHP functions, so you can translate any string by calling the WordPress translate (__) function::
Twig
To translate labels within your Twig template, employ our translation function.
Last updated