Hello, I’m a web craftsman with a passion for the modern web. I build web applications and play with social services and communities.

February 19, 2010 at 11:16 pm

If you develop some kind of multi-language software you will probably make use of something like setlocale in PHP. Now to get your l10n/i18n solution to work on a Debian server you have to install the required locale.

locale -a will show you which locale are installed on your system.

This will output something like this:

C
en_US.utf8
POSIX

To add another locale now, edit /etc/locale.gen and uncomment the locale you need.

I.e. de_DE.utf8 for a German Locale uncomment.

After that run locale-gen as root to activate the new locale system-wide.

Don’t forget to restart your webserver daemon after the change if you want your web application to make use of the freshly activated locale.

Leave a Reply