Step 1: Internationalization

Internationalization (i18n) consists in extracting all the text and formatting specific to a single language, to make your web site or application in more than one language.

For example: "i18n.fr is very helpful." becomes "#about.service#".

A string of text has been replaced with a key, about.service, which will be used to retrieve the text in a language property file.

This is the first step of the conversion process from a monolingual to a multicultural web site.

Let me help you
from Step 1: Internationalization

A common pitfall: Concatenation

During the internationalization process, it is common to create keys for parts of sentences to keep variable parts outside the key.

For example: "There are" and "items in your basket."

The keys are then concatenated with a value to make up the whole sentence. This leads to issues at the next step, when trying to translate each key in a different language.

It is better to use templates with parameters to replace inserted in the text to translate:

"There are #basket.count# items in your basket."

#basket.count# is a placeholder that marks the place where the number of items will be inserted.

The # signs are separators: they surround the name of the parameter, basket.count, and make it stand out, apart from the text before and the text after.