I'm running a marathon for charity!   Donate Here.

My First Truly Multi-lingual Website

June 3, 2013
2 minute read

The first time I saw how online translators like Babelfish and Google Translate work, I knew they would never be a good solution. There is simply no way to have a machine properly translate a sentence from one language into another with all the proper grammar, tone, etc. I thought for a second it might work, then quickly realized: nope.

So when my friend was in need of a website in both English and Spanish, I had to find a decent solution. The parameters of the website were as such: develop a multi-lingual website with a responsive design built on a content management system so the client could update content and images. Both languages needed to be easily updated.

So I thought to myself: 'should I build two different websites?' Maybe just make things easy and build the spanish version on a sub-domain? Effectively giving the client two different websites to login to and update? This wasn't exactly the easiest option because future maintenance would require updates to two websites. Plus the client didn't really want to provide upkeep on two different sites.

Another option was to branch the site at the main level and add sub-folders for each language. I guess this would require the homepage to act as a landing page where the user could choose which language. The only thing I wasn't crazy about was the fact that this isn't exactly optimized for SEO.

So what did I do? I found Perch CMS -which lets you build an HTML template first, then insert dynamic content areas later. The content that is served up to each area could then effectively be switched out based on what was in the query string. So all we had to do was create a "language" button to change what was in the URL string. I found a super simple tutorial on how to do this here.

So my silver bullet ended up being a super simple solution. Using Perch allowed me to manipulate the CMS into exactly what was needed for the client. He can login and edit content for each page in both English and Spanish - all in one spot. On the front-end when a user clicks on the different language flag, the content areas are swapped out correctly.

Here is the website: www.zoneimport.com