You can programmatically set the language of Joomla with the following code:
$lang = JFactory::getLanguage(); $bla = $lang->setLanguage('fr-FR'); $lang->load();
But when you try to get sitename, it's not translated:
$app = JFactory::getApplication('site'); $sitename = $app->get('sitename'); // <--- Still in English
Did I miss something? Does
load() need an argument to load the translation of sitemap?
Edit: One solution, using raw database query to get it: https://stackoverflow.com/questions/19511362/get-joomla-sitename-in-different-language