From: nfreear Date: Tue, 13 Feb 2007 13:38:53 +0000 (+0000) Subject: Fix for MDL-8507 "Local language pack-name can appear in language code" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c4792df0bf1302160a7608c04d351814b0272c0e;p=moodle.git Fix for MDL-8507 "Local language pack-name can appear in language code" --- diff --git a/lib/weblib.php b/lib/weblib.php index a8a2f832fa..6f28d620a2 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2059,7 +2059,7 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $direction = ' dir="ltr"'; } //Accessibility: added the 'lang' attribute to $direction, used in theme tag. - $language = str_replace('_utf8','',$CFG->lang); + $language = str_replace('_', '-', str_replace('_utf8', '', current_language())); $direction .= ' lang="'.$language.'" xml:lang="'.$language.'"'; if ($cache) { // Allow caching on "back" (but not on normal clicks)