Language switcher footer #297
1 changed files with 2 additions and 2 deletions
|
@ -24,8 +24,8 @@ function agarica_languague_switch_link() {
|
||||||
$route = \Drupal::getContainer()->get('path.matcher')->isFrontPage() ? '<front>' : '<current>';
|
$route = \Drupal::getContainer()->get('path.matcher')->isFrontPage() ? '<front>' : '<current>';
|
||||||
$current_language = \Drupal::languageManager()->getCurrentLanguage($derivative_id)->getId();
|
$current_language = \Drupal::languageManager()->getCurrentLanguage($derivative_id)->getId();
|
||||||
$links = \Drupal::languageManager()->getLanguageSwitchLinks($derivative_id, Url::fromRoute($route))->links;
|
$links = \Drupal::languageManager()->getLanguageSwitchLinks($derivative_id, Url::fromRoute($route))->links;
|
||||||
$links['en']['title'] = 'Browser this page on English.';
|
$links['en']['title'] = 'Browse this site in English';
|
||||||
$links['es']['title'] = 'Consulta esta pagina en Español';
|
$links['es']['title'] = 'Consulta este sitio en Español';
|
||||||
$lid = ($current_language == 'en') ? 'es' : 'en';
|
$lid = ($current_language == 'en') ? 'es' : 'en';
|
||||||
// Remove current language from the links
|
// Remove current language from the links
|
||||||
unset($links[$current_language]);
|
unset($links[$current_language]);
|
||||||
|
|
Loading…
Reference in a new issue