This commit is contained in:
David Valdez 2019-01-22 12:27:57 -06:00
parent 55c322eb79
commit c05100545a

View file

@ -24,8 +24,8 @@ function agarica_languague_switch_link() {
$route = \Drupal::getContainer()->get('path.matcher')->isFrontPage() ? '<front>' : '<current>';
$current_language = \Drupal::languageManager()->getCurrentLanguage($derivative_id)->getId();
$links = \Drupal::languageManager()->getLanguageSwitchLinks($derivative_id, Url::fromRoute($route))->links;
$links['en']['title'] = 'Browser this page on English.';
$links['es']['title'] = 'Consulta esta pagina en Español';
$links['en']['title'] = 'Browse this site in English';
$links['es']['title'] = 'Consulta este sitio en Español';
$lid = ($current_language == 'en') ? 'es' : 'en';
// Remove current language from the links
unset($links[$current_language]);