Created
November 19, 2012 09:21
-
-
Save gagarine/4109794 to your computer and use it in GitHub Desktop.
Two chars language name in drupal's language switcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* theme_link for local block. | |
* | |
* Get language code as language switcher link (two chars) | |
* | |
* @param type $variables | |
* @return type | |
*/ | |
function THEME_links__locale_block($variables) { | |
foreach ($variables['links'] as $key => $value) { | |
$lang = $value['language']->language; | |
$variables['links'][$key]['title'] = drupal_strtoupper($lang); | |
} | |
return theme('links', $variables); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment