Multilingual
Last updated
Was this helpful?
Last updated
Was this helpful?
Advanced Views utilizes WordPress's built-in multilingual capabilities, and in order to translate strings within Views and Cards, your theme must define the "Text Domain" in the .
Advanced Views uses the built-in WordPress translation function __('field label', 'yourThemeTextDomain')
for all View and Card labels. This allows you to translate labels seamlessly using your preferred multilingual plugin, eliminating the need for creating a separate View or Card for every language.
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. See the next chapter to enable automatic strings detection.
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 active the . When enabled, during View and Card saving process, the Advanced Views Framework will automatically deposit the labels into special files. It enables the use of the 'scan' feature in your translation tool, automatically loading all labels for efficient translation.
Multilingual capabilities extend to the Twig and Blade templates as well.
Upon saving a View or Card, the Advanced Views will scan of all these translation calls and interact with them in the same manner, like with the labels from the UI, described above.
Blade allows you to call any PHP functions, so you can translate any string by calling the , as you would do it usually:
To translate labels within your Twig template, employ our or filter.