No, it doesn’t work with qTranslate Slug.
But as a happy user, I really wanted to use it with qTranslate Slug, just like you.
I managed to make them work together, but my hack is really ugly and I don’t expect it to work on any qTranslate Slug install because I kind of hard-coded my qTranslate settings. However, it should work for everybody using foo.bar/lang/some/permalink/structure/. If you use ?lang=lang instead, you’ll have to hack further.
In sitemap-qtranslate.php, replace :
// 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(qtrans_convertURL($permalink, $language, true), $modified_time, $change_freq, $priority);
}
}
by :
global $q_config;
$oslug = new QtranslateSlug();
$oslug->init();
$a = $permalink;
foreach($q_config['enabled_languages'] as $language) {
if ($qt["hide_default_language"] == 1 && $qt["default_language"] == $language) {
$sitemap->AddUrl($permalink, $modified_time, $change_freq, $priority);
} else {
$a = substr($a, 0, strrpos(substr($a, 0, -1), '/')).'/';
if(!in_array($a, array('https://', 'http:/'))) {
$slug = get_post_meta( url_to_postid($permalink), $oslug->get_meta_key($language), true);
$turl = str_replace(home_url(), home_url().'/'.$language, $a.$slug.'/');
$turl = preg_replace('#([^:])//#', '$1/', $turl);
$sitemap->AddUrl($turl, $modified_time, $change_freq, $priority);
}
}
}
Dear developpers of this plugin, thanks for your hard work ! Please integrate some qTranslate Slug support in the next version !
Should you need a starting point, have a look at my dirty code. ??