in the file components/com_jmap/views/sitemap/tmpl/default_xml_content.php [as a test]
line 40:
inside the if clause:
if (@$elm->slug) {
if($langCode == 'en'
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('fc.value'
->from('#__falang_content fc'
->where('fc.reference_id = '.(int) $elm->id)
->where('fc.language_id = 1' )
->where('fc.reference_field = \'alias\''
->where('fc.reference_table = \'content\''
;
//$query->select('alias'
->from('#__content'
->where('id = ' . (int) $item->id);
$db->setQuery($query);
$alias = $db->loadResult();
if(!isset($alias)){
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('alias'
->from('#__content'
->where('id = ' . (int) $elm->id);
$db->setQuery($query);
$alias = $db->loadResult();
}
$elm->slug = $elm->id.':'.$alias;
}
$seolink = JRoute::_ ( ContentHelperRoute::getArticleRoute ( $elm->slug, $elm->catslug, $elm->language ) );
}
the variable $langCode is my way to know if is asked the feed of the english language.
obviously this code is not final and works in my website with only two language.
hope it can help in some way