Translating a Magento shop

Been doing some translation for a shop built with Magento we wanted to try a French version of. For now it uses automated translation, in the future if it proves worthwhile we could move it to using a real translation.
I’m not a French speaker so its difficult to tell how good the machine translation is but we think its probably good enough to prove the feasibility of the scheme. Subtleties about French in France and French in Canada are a bit beyond us, but we are aiming at the French in France.

We made the French shop a Store View so it shares the same stock and pages as the main site but under a different domain name. Which seemed the simplest way.

Technically

We add the text block to a list of the product texts when the English text is altered. Then a PHP script goes through recently altered texts and gets the translation of that text in French. We also have a local translation cache somewhat inspired by, but much simpler than the Etsy scheme. This way we can save translating strings that have already been translated. In the shop I’m working on the short descriptions and full descriptions for products are actually the same so there no point translating them twice.

We are using Bing translate because their API seemed to make sense and they had a large free tier (2 million words) I could try stuff out on. It seems very solid technically it always seems to be there and hasn’t caused any issues so far. They also have a wide range of languages if your doing something more esoteric including Klingon ( pe’el maH roj ).

It was originally built on the Data Marketplace and now switched over to the newer Azure where its a bit hidden on portal.azure.com under Intelligence + Analytics > Cognitive Services API. If you have trouble creating an account / subscription I found they don’t like things they regard as prepaid cards, but don’t say that instead putting up a ‘problem with your account contact support’ message. Debit cards seem to work.

Magento makes translation not too technically demanding, basically you add alternative language versions of your CMS pages like contact us, about us, shipping, terms and conditions etc. Then you go through your various templates and check for any strings not in tags like this __(‘In Stock’); ?>
The strings are then looked up in the corresponding language files under app/etc/locale/fr_FR. If you haven’t got the language pack you can take a look on the Magento connect site and use one of those as a basis. Things that still come up in English need adding to the .xml files in lines
‘base language’, ‘translation’
style like
“Free”,”Gratuit”. There is lots of going through pages and checking for little English chunks.

You’ll also need to create/edit a switch template to allow users to switch languages and or currencies. In the way you want it to work and that is simple for the visitor to the site to use.

This was all in Magento 1.x;