Preparing Your Website for Translation – Part 2

Preparing Your Website for Translation – Part 2

screenshot of web codeIf you need to translate websites, we’ve already listed a few ways to incorporate translation into your content layout and media asset creation, starting during the earliest stages of your web development. By building localization into your design from the start – creating a global template – you will save time and find it even easier to roll out new languages down the road. In today’s post, we’ll cover considerations for front-end development, currency, and date/time. If you’re currently building a website, make sure to pass this one on to your dev team!

Front-End Development


web code graphicUse proper and well-formed HTML code. To capture content, a translation management system (TMS) needs to parse the HTML, interpret the structure, and extract the content accordingly. The parser used by the TMS is similar to the one used in a browser but not as forgiving – unclosed tags or improper tags will result in missing or poorly parsed content. You can check your HTML using the W3 HTML Validator.


When it comes to CSS, avoid creating too many styles, adding page-specific overrides or style exceptions. The more disciplined and consistent you are with your stylesheet, the easier it is to make locale-specific changes, i.e. language expansion or compression. 


Translation software cannot parse hard-coded content out of a Javascript file so you’ll need to externalize the content. Content strings should be substituted by variables in your Javascript file and the variables stored in a separate resource file, which can then easily be processed for translation. 

ex. of proper and improper java code


currency graphicWill your website have an e-commerce component? Do you plan on listing prices? These are important questions to consider, especially as you think about localizing for currency. If you plan on managing financial transactions on your site, you should choose an e-commerce platform that has the ability to support multiple currencies natively. For the actual shopping cart, Smartling uses a system of patterns so that the variable content is only translated once. 

Date and time

date and time graphicDates and times are displayed and presented differently depending on cultures, languages, and countries. For example, most of Western Europe uses a 24-hour clock (military time), while we use a 12-hour clock in North America. The best way to incorporate date and time into your web design is to produce a universal time stamp, based on ISO 8601 for example. The universal time stamp can then be formatted automatically for the target location using a variety of libraries, saving you from having to hard-code country-specific values.

About Team Smartling

Smartling is a software company with the mission to make the world’s content multilingual.


FB Campus

How to Move Fast, Break...

When agile companies first consider localizing digital content, an irresistible force often meets an immovable object. Their insistence on continuous...
Continue reading
Translation Speed

5 Translation Keys For Businesses...

Grow fast or die slow. This McKinsey mantra serves as a warning to any entrepreneur with dreams of building the...
Continue reading
global audience

Fuel Your International Marketing With...

Translating your brand message in a way that resonates with foreign audiences remains the central challenge of international marketing. But...
Continue reading

Translation Quality or Translation Speed?...

All marketing gigs are not created equal. “We’re essentially creating a new language,” explains Toni Vicars, Marketing Director EMEA of...
Continue reading