Home  -  Login  -  Contact  -  Free Tools  -  Blog

What needs to be localized?

Issue 8, May/27/2009

<p>When you translate a program, website or just a text document, you need to remember that just translating the text from one language to the other may not be enough.</p> <p>In this article, we'll cover things that need to be adapted to different languages and even countries.</p> <h2>Localization checklist</h2> <ul> <li>Currencies (and amounts)</li> <li>Number format</li> <li>Dates</li> <li>Units</li> <li>Phone numbers and addresses</li> <li>Time zones</li> </ul> <h3>Currencies</h3> <p>If your English brochure (for US clients) says "$19.95", what can this mean for people outside of the US?</p> <p>Do you mean <em>US Dollars</em>, maybe <em>Canadian Dollars</em> or even <em>Argentinian Pesos</em>? Tough to tell...</p> <p>The solution <strong>specify the currency using its name</strong>.</p> <p>The cost would be crystal clear, to anyone in the world if you write "$19.95 USD". Then, when translators work on your brochure, they'll also know what it means and be able to translate it properly.</p> <h4>Which currencies?</h4> <p>Although the USD and Euro zones include many people, there are still many other currencies in the world. Have a look here for a full reference - <a href="http://en.wikipedia.org/wiki/List_of_circulating_currencies">http://en.wikipedia.org/wiki/List_of_circulating_currencies</a>.</p> <h3>Number formats</h3> <p>In English, you would write number like 1,324.98. However, in German, it would be 1.324,98 - can you notice the difference? To make you text appear as native German, you should change number formatting. If it's plain text, your translator would take care of that, but if a program is generating these numbers, the number format needs to be adapted.</p> <h3>Dates</h3> <p>Many programs and websites display dates. Blogs, for example, normally display the publish date for posts. May sites also display the current time.</p> <p>Date format changes between languages. Not only the names of months and days but also their order. In the US, people normally use Month/Day/Year. In Europe, it's Day/Month/Year.</p> <p>To handle this correctly, programs normally implement a special function for displaying dates. This function would take into account the locale and display the date as it should.</p> <h4>Some date formatting examples</h4> <ul> <li>US: %Y-%m-%d</li> <li>Europe: %d-%m-%Y</li> <li>Japan: %Y-%m-%d</li> </ul> <p><em>%Y - year, %m - month, %d - day</em></p> <p>For further reading, visit the ISO page - <a href="http://www.w3.org/QA/Tips/iso-date">http://www.w3.org/QA/Tips/iso-date</a>.</p> <h3>Units</h3> <p>Supposing your doing a recipe application and you need tell tell the cook to use one pound of cream. How would a French chef feel about it? In Europe people don't use pounds, inches or feet. They use the Metric system. Your recipe should ask for half a Kilo of cream (or more precisely, 453.6 grams).</p> <p>Just like dates, numbers with physical units should go through a special routine which adapts their display for the selected locale.</p> <p>Wikipedia has a great page about different unit systems and where in the world they're used - <a href="http://en.wikipedia.org/wiki/Units_of_measurement">http://en.wikipedia.org/wiki/Units_of_measurement</a>.</p> <h3>Phone numbers and addresses</h3> <p>We're not going to suggest that your phone number is different when dialed from Australia, but maybe it needs to be displayed slightly different.</p> <p>When you display phone numbers inside the US, you normally start with the area code and omit the country code (+1). If you need foreign clients to call you, the country code should be included too. You can also go the extra mile and find out how they normally dial foreign numbers.</p> <p>Same thing goes for the address. Make sure it ends with your country.</p> <p>And, if your application needs to input and process user phone numbers and dates, make sure that you support their format. Some countries have states, some have districts (or provinces) and some don't have any.</p> <h3>Time zones</h3> <p>Some programs need to do certain things at given times. For instance, if you're doing online trading, your program depends on the stock market and its local time.</p> <p>When you display the time, remember to also display the time zone. It's going to be very helpful for many people if your program could switch back and forth from your time to their.</p> <h2>Conclusions</h2> <p>Most of the items we covered are best handled by writing specialized routines for displaying values. It's also important that the program store the all values in a way that permits conversion. For example, you can store dates as a string, or as <em>seconds since epoch</em> (see <a href="http://en.wikipedia.org/wiki/Unix_time">http://en.wikipedia.org/wiki/Unix_time</a>). Saving the date as an integer will greatly simplify adapting it to different locales.</p> <p>Managing the visual formatting in one place has many advantages:</p> <ul> <li>Test once, works for all.</li> <li>Easy to maintain (like adding a new language).</li> <li>Flexible - can be adapted to any specialized display needs.</li> </ul> <p>The obvious cost is that all this has to be taken into consideration when writing the program or building the website. Like in many other cases, taking the long road usually helps get there faster.</p>

Back to the list of articles

© 2021. OnTheGoSystems INC. All Rights Reserved.   |   Privacy Policy and GDPR Compliance