Extension for Polylang plugin (Polylang is an extension to make multilingual WordPress websites.).
Plugin is needed to translate the WordPress themes and plugins by Polylang. ![]() DescriptionWhat is “Theme and plugin translation for Polylang”?How it is work?
“Theme and plugin translation for Polylang” automatically searches all files of WordPress themes and plugins. It chooses from this file only those files with extensions:
Google Translate app is a free application for Android and iOS smartphones and tablets. The app’s 500 million users are able to translate between up to 103 languages in a number of ways.
In addition, is implemented the integration with Timber library (read more: http://timber.upstatement.com) – which allows to translate twig’s skins in simple way.
Plugin in searched skins or plugins chooses texts from Polylang functions, such as:
For example:
On the timber context declare this functions like:
See more on:
https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/ This functions are defined by Polylang plugin for printing translations. Thanks “Theme and plugin translation for Polylang” you can find these strings to translate and add to Polylang register on very simple way. And then you can translate these texts from the admin dashboard. The scan result can be seen on the tab with translations: Settings -> Languages -> String translation or Languages -> String translation
You don’t need programs like poedit – you don’t change files with extensions like:
.pot , .po , .mo .“Theme and plugin translation for Polylang” is highly efficient because the scanner is worked only on admin dashbord in tab:
or
Export and import string translationInstallation
This plugin requires installed and activated the Polylang plugin,
This plugin requires PHP 5.0
UseHow to enable Twig extension with “Theme and plugin translation for Polylang”? [Timber plugin]
In functions.php add:
Next, for example in index.php add:
Then you can use in twig templates polylang functions like this (in templates/home.twig):
Reviews
Was looking for a plugin like this for a long time! Thanks man, works very well!But I still think it's strange this isn't default in Polylang.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |