Index: trunk/core/units/languages/languages_tag_processor.php =================================================================== diff -u -N -r6707 -r7391 --- trunk/core/units/languages/languages_tag_processor.php (.../languages_tag_processor.php) (revision 6707) +++ trunk/core/units/languages/languages_tag_processor.php (.../languages_tag_processor.php) (revision 7391) @@ -16,9 +16,9 @@ $edit_direct = $this->Application->GetVar('phrases_label'); $top_prefix = $this->Application->GetTopmostPrefix($this->Prefix); - if( $this->Application->GetVar($top_prefix.'_mode') == 't' && !$edit_direct ) + if( substr($this->Application->GetVar($top_prefix.'_mode'), 0, 1) == 't' && !$edit_direct ) { - $object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params); + $object =& $this->getObject(); return $object->GetDBField('Charset'); } $lang_current =& $this->Application->recallObject('lang.current'); @@ -54,6 +54,22 @@ return $ret; } + /** + * Returns true if system has more then 1 language installed + * + * @param Array $params + * @return bool + */ + function IsMultiLanguage($params) + { + return $this->TotalRecords($params) > 1; + } + + function IsPrimaryLanguage($params) + { + return $this->Application->GetDefaultLanguageId() == $this->Application->GetVar('m_lang'); + } + /* function Main_IsMetricUnits($params) { $object =& $this->Application->recallObject($this->Prefix.'.current');