Chapter 14. Internationalization

Let us be fully aware of all the importance of this day, because today within the generous walls of Boulogne-sur-Mer have met not French with English, nor Russians with Polish, but people with people.

—Ludoviko Zamenhof, the founder of Esperanto


  • Introducing i18n.

  • Using the CLI to translate view templates.

  • Displaying time and date in different locales.

  • Translating form elements.

  • Using a database to store translations.

Multilingual websites are becoming increasingly popular, not only among users, but also developers and important strategic partners who want to see web apps translated into their native languages. While translating into languages transcribed using Latin-derived charsets is relatively easy, there are also multiple scripts that use completely different charsets, ideographic symbols, and right-to-left text orientation. Internationalization is not only a matter of courtesy but is also an excellent tool for tapping into the great revenue potential that an international market presents.

Web frameworks widely support internationalization. They provide useful libraries or even ready-to-use solutions. In this chapter, we show you how easy it is to extend your web applications to use multiple languages and cultural settings.


Internationalization, often abbreviated to i18n because it is a long word, goes far beyond providing a full Unicode charset. It concerns many other issues such as the following: ...

Get Building PHP Applications with Symfony™, CakePHP, and Zend® Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.