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;

Websites in Translation

I’ve done a few websites in translation now and they are usually more interesting than doing a normal single language site. If your product/organisation is available in a different region its the thing to do. If you want to expand into that area its a great start. I’m very much less likely to use your product if its not even presented in my own language.

Often people who speak several languages can get by in English but they shouldn’t have to. I’m sure even a multilingual Dutchman would appreciate the effort if you tried putting some of your content in Dutch. If you can’t translate the entire site you could start by translating just the core functionality. You could add a google translate select box which is a pretty simple/cheap way of adding survival translation. A translator will point that this, while good for a machine, may not translate content in a professional way.

Maintenance of international sites

Maintaining sites in multiple languages is more complicated but if you do things in the right way you can minimise the extra work and also reduce the effort that will be required if you want to expand your site into another language in the future. So its worth having a think about if your sites content management system will accommodate different languages. Also as your site is built you want to avoid text as pictures as that would mean every language having a different picture.

Detection and Switching of translation

If you build the site in the right way the person visiting the site won’t have to choose their language as you auto detect this from their browser. That is the best way although you should give them the option of choosing to view the site in a different language from that auto detected. If you do offer switching something some sites do is lose your state, if you have come into a site twenty pages from the homepage, via search for example, you want to click a translate flag and see that page in your chosen language not be redirected to another page or another sites root.( that really annoys me! and people do it grrr!).
Its worth considering what flags you use as well I built a site that had versions in Chinese and English for the English part of a company owned from the U.S. so we ended up with a flag for English that was a merge of both the stars and stripes and the union jack. The Americans were thought to be in the majority even if the language is English.

Regions

Its more than just a language though, some sites can benefit to localisation so If your trying to appeal to Americans you would use different terms or spellings to those that you would choose for residents of the UK. Its worth talking to a professional translator even if you have people in your organisation with the relevant languages as they may have access to someone who lives in the region. A site aimed at French speaking Canadians might be slightly different to one aimed at French speakers in Europe.

Links Out

Think about the sites you link to some regions of the world may not get the same content as you do, if I follow a link from an Australian site to a page on the BBC sometimes that content is blocked for me but an Australian would see the content as intended. You can get an idea of this if it is an issue for you by using web proxies in the audiences region.

There is a quite a lot to think about when creating translated sites not just the translation but the regionalisation, localisation, currencies, hosting location and local regulations. It really isn’t so bad though and when you think of the size of the new markets you could be opening your self up to its a big winner.