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

Well, I mean those numerical "strings" are not displayed on that tab. So I can't even to try to translate them.

XML content: http://imgur.com/OswWzzZ
String translation tab: http://imgur.com/RaW74GV

There should be seven another strings between fax_number and currency_unit.

I searched Polylang source codes and found for example register_string_recursive() (wpml-compat.php).

protected function register_string_recursive($context, $strings, $options) {
		foreach ($options as $name => $value) {
			if (isset($strings[$name])) {
				if (is_string($value) && $strings[$name] == 1) // !!! -----> is_string($value) ... and $value is number/ID ...
					pll_register_string($name, $value, $context);
				elseif (is_array($value) && is_array($strings[$name]))
					$this->register_string_recursive($context, $strings[$name], $value);
			}
		}
	}

Those is_string() conditions creates this problem I suppose.


Viewing all articles
Browse latest Browse all 11471

Trending Articles



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