Index: branches/5.1.x/units/orders/orders_tag_processor.php =================================================================== diff -u -r13100 -r13465 --- branches/5.1.x/units/orders/orders_tag_processor.php (.../orders_tag_processor.php) (revision 13100) +++ branches/5.1.x/units/orders/orders_tag_processor.php (.../orders_tag_processor.php) (revision 13465) @@ -1,6 +1,6 @@ Application->ConfigValue('Comm_'.$field); if ($field == 'Country') { - $sql = 'SELECT DestName - FROM '.TABLE_PREFIX.'StdDestinations - WHERE DestAbbr = '.$this->Conn->qstr($value); - $value = $this->Application->Phrase( $this->Conn->GetOne($sql) ); + $current_language = $this->Application->GetVar('m_lang'); + $primary_language = $this->Application->GetDefaultLanguageId(); + + $sql = 'SELECT IF(l' . $current_language . '_Name = "", l' . $primary_language . '_Name, l' . $current_language . '_Name) + FROM ' . TABLE_PREFIX . 'CountryStates + WHERE IsoCode = ' . $this->Conn->qstr($value); + $value = $this->Conn->GetOne($sql); } if ($field == 'Country' && $value) { @@ -814,7 +817,7 @@ $cs_helper =& $this->Application->recallObject('CountryStatesHelper'); /* @var $cs_helper kCountryStatesHelper */ - $cs_helper->PopulateStates(new kEvent('u:OnBuild') , 'State', 'Country'); + $cs_helper->PopulateStates(new kEvent('u:OnBuild'), 'State', 'Country'); } function UserLink($params)