Why Does Polylang Not Use The Default WordPress Translate Function?
-
Hello,
I am curious as to why Polylang does not work when using the WordPress translate functions (
__(),esc_html__(), etc). For a theme to be able to run without Polylang enabled, it would require that every time a string needs to be translated in the template, you would need to do something like<?php echo function_exists('pll__') ? pll__('My string') : __('My string', 'my-domain') ?>Which seems a bit crazy.. Maybe I am missing something though.
I see that the plugin has the
plugins-compat.phpfile for 3rd party plugin support, so why does it not support a theme in a similar manner (possibly scanning theme for WordPress translation function calls like WPML does. and yes I already know of the existing plugin that does this, but it only works with thepll__version and not the WP__()version)?Thanks very much.
The topic ‘Why Does Polylang Not Use The Default WordPress Translate Function?’ is closed to new replies.