cindy Cindy Multishop experienced Topic creator registered since: 07.09.2011 Posts: 24 | Hi, My website is in French and German. When I go to the baket for order, I must write my address and my Land. For the moment, in my list of Land, I have : Austria, Belgium, Switzerland. But I would like when I am on the website french -> Autriche, Belgique, Suisse and when I am on the website german -> Osterrich, Belgien and Schweiz. My translations are done -> Item Land in TYPO3, but it doesn't work. I saw in the file : checkout_address.php (checkout) and I see, that the name cn_short_en is use. [html4strict] // load countries if (count($enabled_countries) ==1) { $row2=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry2); $content.='<input name="country" type="hidden" value="'.strtolower($enabled_countries[0]['cn_short_en']).'" />'; $content.='<input name="delivery_country" type="hidden" value="'.strtolower($enabled_countries[0]['cn_short_en']).'" />'; } else { foreach ($enabled_countries as $country) { $tmpcontent_con.='<option value="'.strtolower($country['cn_short_en']).'" '.(($user['country']==strtolower($country['cn_short_en']))?'selected':'').'>'.htmlspecialchars($country['cn_short_en']).'</option>'; $tmpcontent_con_delivery.='<option value="'.strtolower($country['cn_short_en']).'" '.(($user['delivery_country']==strtolower($country['cn_short_en']))?'selected':'').'>'.htmlspecialchars($country['cn_short_en']).'</option>'; } if ($tmpcontent_con) { $content.=' <div class="account-field"> <label for="country" id="account-country">'.ucfirst($this->pi_getLL('country')).'*</label> <select name="country" id="country" class="country"> <option value="">'.ucfirst($this->pi_getLL('choose_country')).'</option> '.$tmpcontent_con.' </select><span class="error-space"></span> </div> '; } } [/html4strict] How can I modify to get cn_short_fr, if I am on the website french or cn_short_de if I am on the website german. Thank you very much, Cindy |
Written on: 22. 03. 2012 [08:21] |
bas Bas van Beek Multishop guru registered since: 12.05.2010 Posts: 644 | The static_countries table is only providing the local country name and the english name. I recommend that you save your checkout to the fileadmin folder and that you adjust checkout_adresss.php. Something like: foreach ($enabled_countries as $country)
{
switch ($this->lang)
{
case 'nl':
switch (strtolower($country['cn_short_en']))
{
case 'netherlands':
$country['cn_short_en']='Nederland';
break;
case 'belgium':
$country['cn_short_en']='Belgie';
break;
case 'germany':
$country['cn_short_en']='Duitsland';
break;
}
break;
case 'de':
switch (strtolower($country['cn_short_en']))
{
case 'netherlands':
$country['cn_short_en']='Niederlande';
break;
case 'belgium':
$country['cn_short_en']='Belgien';
break;
case 'germany':
$country['cn_short_en']='Deutschland';
break;
}
break;
default:
break;
}
} Attachment |
Written on: 23. 03. 2012 [01:49] |
cindy Cindy Multishop experienced Topic creator registered since: 07.09.2011 Posts: 24 | Hi, Thanks, it works ! But my customer isn't technically, and it's difficult for him if he wants add a land. Maybe can you automatically do for a next update ? Thank you very much ! Cindy |
Written on: 23. 03. 2012 [09:22] |