}
function get( $key, $useDB, $forcontent=true ) {
+ global $wgContLanguageCode;
if($forcontent) {
- global $wgContLang, $wgContLanguageCode;
+ global $wgContLang;
$lang = $wgContLang;
$langcode = $wgContLanguageCode;
}
$message = false;
if ( !$this->mDisable && $useDB ) {
- $title = $lang->ucfirst( $key )."/$langcode";
-
+ $title = $lang->ucfirst( $key );
+ if($langcode!=$wgContLanguageCode)
+ $title.="/$langcode";
# Try the cache
if ( $this->mUseCache && $this->mCache && array_key_exists( $title, $this->mCache ) ) {
*
*/
function makeHTMLText( $messages ) {
- global $wgLang, $wgUser, $wgLanguageCode;
+ global $wgLang, $wgUser, $wgLanguageCode, $wgContLanguageCode;
$fname = "makeHTMLText";
wfProfileIn( $fname );
wfProfileIn( "$fname-output" );
foreach( $messages as $key => $m ) {
- $title = $wgLang->ucfirst( $key )."/$wgLanguageCode";
+ $title = $wgLang->ucfirst( $key );
+ if($wgLanguageCode != $wgContLanguageCode)
+ $title.="/$wgLanguageCode";
$titleObj =& Title::makeTitle( NS_MEDIAWIKI, $title );
$talkPage =& Title::makeTitle( NS_MEDIAWIKI_TALK, $title );
if(!is_object($lang)) {
die ("class $langclass not defined. perhaps you need to include the file $langclass.php in $wgContLangClass.php?");
}
+ if($v==$wgContLanguageCode)
+ $suffix='';
+ else
+ $suffix="/$v";
foreach ($sortedArray as $key => $msg) {
- $messages[$key."/$v"] = $lang->getMessage($key);
+ $messages[$key.$suffix] = $lang->getMessage($key);
}
}