Currently Language::fetchLanguageName( 'en-GB' ) returns false as
it expects 'en-gb'. Given that technically speaking, 'en-GB'
is the canonical form, I don't think this is a good thing.
Changed function to lowercase its argument. There's no
Language object handy, so I just used strtolower (since language
codes are always ascii, that shouldn't matter)
Change-Id: Iba1f581bf2d6d2b26a14f9f80699d8eeb5d724d6
* @since 1.20
*/
public static function fetchLanguageName( $code, $inLanguage = null, $include = 'all' ) {
+ $code = strtolower( $code );
$array = self::fetchLanguageNames( $inLanguage, $include );
return !array_key_exists( $code, $array ) ? '' : $array[$code];
}