@dab
if you want the forms, such as shown on the checkout page, multilingual, then, as a first step, you need to enable i18n.
That alone is not enough though. In the trunk ecommerce module many (but not all) displayed strings are i18n enabled, however even if the translation exists, SS does not find it, and thus not display it (SS 2.3.1).
Fortunately that is not difficult to fix. Let's take for example the checkout form, personal details. That part of the form is defined in ecommerce/code/model/EcommerceRole.php, and is not i18n enabled yet. The textfields are defined with
new TextField('FirstName', 'First Name'),
which needs to get changed to
new TextField('FirstName', _t('Member.FIRSTNAME','First Name')),
here is the complete modified function:
/**
* Return the member fields to be shown on order forms.
* For orders made by existing members, this will be called on that member.
* For new orders, this will be called on the singleton object.
*
* Modified by Kalileo 2009-04-15
* to include " _t('Member.FIRSTNAME','First Name'),"
* instead of "new TextField('FirstName', 'First Name'),".
* at the relevant fields in order to enable i18n automatic translations
*
* This will use the existing translation in "Member." and "OrderInformation.ss."
*/
function getEcommerceFields() {
$fields = new FieldSet(
new HeaderField(_t('OrderInformation.ss.CUSTOMERDETAILS','Personal Information'), 3),
new TextField('FirstName', _t('Member.FIRSTNAME','First Name')),
new TextField('Surname', _t('Member.SURNAME','Surname')),
new TextField('HomePhone', _t('OrderInformation.ss.PHONE','Phone')),
new TextField('MobilePhone', _t('OrderInformation.ss.MOBILE','Mobile')),
new EmailField('Email', _t('OrderInformation.ss.EMAIL','Email')),
new TextField('Address', _t('OrderInformation.ss.ADDRESS','Address')),
new TextField('AddressLine2', ''),
new TextField('City', _t('OrderInformation.ss.CITY','City')),
new DropdownField('Country', _t('OrderInformation.ss.COUNTRY','Country'), Geoip::getCountryDropDown(), self::findCountry())
);
$this->owner->extend('augmentEcommerceFields', $fields);
return new CompositeField($fields);
}
with that code a call to e.g. domain.tld/de/checkout/?flush=1 should now show the labels of these fields in German (assuming your cart is not empty).
I hope this helps you to find the required modifications in your code.