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

mklusak on "[Plugin: Polylang] Wpml-config.xml strings skipped when numbers (IDs)"

$
0
0

Yes, it works, but ... I don't want to hardcode those changes to your plugin and disable its later updates :( Have those is_string() checks any special meaning? Will it "break" when removed?

But there is another issue - the other plugin loads settings on 'init' action, and this code

$this->settings = get_option( 'quitenicebooking' );
echo "Step 1: " . $this->settings['step_1_page_id'];

... echoes "Step 1: 5" ... but translated value is 213. But this is echoed on the top of the page, before any HTML ... plugin has one widget, it is placed in sidebar, and it loads plugins settings again, via $quitenicebooking_settings = get_option('quitenicebooking'); ... and now the 5 value is correctly translated to 213!

I checked that wpml-compat.php translate_strings() function is called even before the first settings load, but returns untranslated values. So I think that when booking plugins loads, Polylang functions works (after is_string() removal), but the setting translation is not available at the moment. But it is available later when the page renders (booking widget loading same settings).

Do you have any idea what can be wrong now?


Viewing all articles
Browse latest Browse all 11471

Trending Articles



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