Plugin Author
Chouby
(@chouby)
Hello,
Plugins are not loaded on this page. So there is nothing I can do.
Thread Starter
Tii
(@tii)
is there a way to hack this ? I can change the wp-activate.php file in order to load polylang then ?
Thread Starter
Tii
(@tii)
I have been looking around and Polylang is actually loaded in that page!
Thread Starter
Tii
(@tii)
So, I searched for the solution.
First, I needed to activate polylang on the Network (multi-site) level. This made it available to the wp-activate.php page.
Then, I created a header-wp-activate.php file (copied from my theme into my child theme) and added these lines in the end of it:
/**
* @param $determined_locale
* @return bool|PLL_Language|string
*/
function set_locale_polylang($determined_locale) {
if (function_exists('pll_current_language')) {
return pll_current_language('locale');
}
return $determined_locale;
}
add_filter('pre_determine_locale', 'set_locale_polylang');
load_default_textdomain();
This fixed the issue
-
This reply was modified 6 years, 3 months ago by
Tii.