Index: branches/unlabeled/unlabeled-1.8.2/core/units/general/helpers/multilanguage.php =================================================================== diff -u -r6146 -r6908 --- branches/unlabeled/unlabeled-1.8.2/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 6146) +++ branches/unlabeled/unlabeled-1.8.2/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 6908) @@ -204,6 +204,8 @@ } $ret = ' '; + $ml_field = preg_replace('/l(.*)_(.*?) (.*)/', '\\2', $field_mask); + $i_count = $start_index + $create_count; while ($start_index < $i_count) { list($prev_field,$type) = explode(' ', sprintf($field_mask, $start_index - 1) ); @@ -226,7 +228,10 @@ if ($this->curIndexCount < 32 && ($start_index == $this->Application->GetDefaultLanguageId() || !$single_lang)) { // create index for primary language column + for all others (if multiple languages installed) list($field_name, $field_params) = explode(' ', $field_expression, 2); - $ret .= 'ADD INDEX (`'.$field_name.'` (5) ), '; + + $index_type = isset($this->curFields[$ml_field]['index_type']) ? $this->curFields[$prev_field]['index_type'] : 'string'; + + $ret .= $index_type == 'string' ? 'ADD INDEX (`'.$field_name.'` (5) ), ' : 'ADD INDEX (`'.$field_name.'`), '; $this->curIndexCount++; } Index: branches/unlabeled/unlabeled-1.7.2/core/units/languages/languages_tag_processor.php =================================================================== diff -u -r6893 -r6908 --- branches/unlabeled/unlabeled-1.7.2/core/units/languages/languages_tag_processor.php (.../languages_tag_processor.php) (revision 6893) +++ branches/unlabeled/unlabeled-1.7.2/core/units/languages/languages_tag_processor.php (.../languages_tag_processor.php) (revision 6908) @@ -65,6 +65,11 @@ 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');