in the past I faced a little issue in one of my sites.
$jinput = JFactory::getApplication()->input;
if ($jinput->getString('option') == 'com_content' && $jinput->getInt('id') && $jinput->getInt('Itemid') == --menu-Itemid-where-override-should-be-active--) {
$articleId = preg_replace('/-/', ':', substr(strrchr(JUri::current(), "/"), 1), 1);
foreach ($list as $language) {
if (!$language->active) {
$language->link = JRoute::_("index.php?view=article&id=" . $articleId . "&Itemid=" . --language-associated-menu-item-- . "&lang=" . $language->sef);
}
}
}
This change is not only helpful for the users to change the language and not lose track, but also for search engines if the "hreflang" property is set in the Language Switcher module.