Using polylang, how can I see which post is the “original” and which are the “translated children”? [closed]

polylang stores translation in a taxinomy but it’s better to access them with the polylang object like that : // test if the plugin polylang is present if (isset($GLOBALS[“polylang”])) { $translations = $GLOBALS[“polylang”]->model->post->get_translations($post->ID); // $translations contains an array with all translations of the post } all translations are interconnected then there is no parent translation. … Read more

Compile errors during translation compile

The % character is a special character in the gettext translation functions. To escape the % character to use it in a string, change it to %%. If you weren’t using the __() translation functions, then a single % character would give you the number of comments. However, when you are using the translation functions, … Read more

Make changes to translation?

You can make changes to the translation, yes, but it’s not as simple as editing the text inside the fi.po file (or any PO file, for that matter). That’s because WordPress actually uses another file, with an .MO extension, to render the translations. That extension is not meant to be read by humans, so you … Read more

Transfer from English page to Arabic page

Try the following. This is given that the original page url has a .html in it (contact.html and info.html) <li><a href=”https://wordpress.stackexchange.com/questions/87146/<?php if (false !== strpos(strtolower($_SERVER[“REQUEST_URI’]), ‘.html’)) { $uri = str_replace(‘.html’, ‘-ar.html’, strtolower($_SERVER[‘REQUEST_URI’])); } else { $uri = ”; } echo home_url($uri); ?>”>arabic</a></li>

POEdit with Custom mu-plugins code

I’m not 100% sure this is the only issue that was preventing POEdit from correctly parsing my code (I’m not sure it actually cares about the WordPress side of things), but fixing these (stupid) errors and re-running POEdit from the .pot file below seems to have generated the correct translation strings: define( ‘MY_TEXTDOMAIN’, ‘MY_TEXTDOMAIN’ ); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)