How to build multilingual app (PHP and Gettext)

Click for: original source

Igor Santos article on challenges of building multilingual applications. Whether you are building a website or a full-fledged web application, making it accessible to a wider audience often requires it to be available in different languages and locales.

Internationalization (i18n) of your codebase, helps ensure that it can be adapted to different languages or regions with relative ease.

He then dives into:

  • Tools for internationalization
  • Libraries to make things easy
  • Separating domains
  • Locale code
  • Tips and tricks - e.g. server caching issues

He also describes why you may want to use the Gettext formats, so you can use the original Gettext toolchain (including Poedit) as described in the rest of the chapter.

Article then goes into example usage and how in a common application, you would use some Gettext functions while writing static text in your pages. Plenty of code examples included.

[Read More]

Tags programming php