Ah, yes there is a solution….
The adjustment to make it work with qTranslate X (same as in a previous post)
In the (Google XML Sitemaps v3 for qTranslate) plugin folder is a file named – sitemap-qtranslate.php
search qtrans_ and replace it with qtranxf_
Now for qTranslate Slug –
At the end of that same file is:
// Add an extra permalink url for every non-default qTranslate language
foreach ($languages as $language) {
if ($qt["hide_default_language"] == 1 && $qt["default_language"] == $language) {
$sitemap->AddUrl($permalink, $modified_time, $change_freq, $priority);
} else {
$sitemap->AddUrl(qtranxf_convertURL($permalink, $language, true), $modified_time, $change_freq, $priority);
Replace this with:
// Add an extra permalink url for every non-default qTranslate language
foreach ($languages as $language) {
if ($qt["hide_default_language"] == 1 && $qt["default_language"] == $language) {
$sitemap->AddUrl($permalink, $modified_time, $change_freq, $priority);
} else {
// get id
$id = url_to_postid($permalink);
// get object post
$post = get_post($id);
// get slug translation with post->ID
$title = get_post_meta($post->ID, "_qts_slug_".$language, true);
if ($title) // if slug translation exist, add to sitemap
$sitemap->AddUrl(home_url()."/$language/".$title."/", $modified_time, $change_freq, $priority);
And voila…
Thanks to Curky
It is obviously a solution that is reset when the plugin is updated.