Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

Ahaenor on "[Plugin: Polylang] Getting string translation on custom language"

$
0
0

Hello,

I wish my WP to automatically send an email in different languages, depending on some program condition.

I have a pll_register_string() for an email text, and this text is translated. But pll__() always returns an email text in WP's native language, and I'm failing to see where can I use this program condition of mine.

Is it possible to do something like this:

$translation = pll__($my_string, 'en'); // get english translation
$translation = pll__($my_string, 'fr'); // get french translation

I have a latest Polylang and WP.
Permalinks structure is /%postname%/
Homepage is static.

https://wordpress.org/plugins/polylang/


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>