Chapter 22. Localizing Your Perl Programs

Sean M. Burke

Jordan Lachler

Once upon a time, when the Internet was merely an experiment in getting a few dozen machines to talk to each other without actually melting, and when computer science was about getting your accounting program to run in 5K of core, it didn’t matter that program output was in English, only in English, and MAYBE EVEN ALWAYS IN CAPITALS. After all, computers were basically designed by and for a few American engineers, and as long as packets were swapped and numbers were crunched, everyone was happy.

But nowadays, computers are becoming part of daily life for much of the planet, and that means that the average user is less and less likely to be a native speaker of English. And software that doesn’t work in your native language is very annoying, even if it does work in some other language you understand fluently.

The first step to making software “work,” in your language of choice, is called internationalization (often abbreviated “I18N”). Internationalizing a piece of software, or a file format, or a protocol, basically means making sure it can convey text in any language. Mercifully, this has been mostly taken care of; modern protocols and data formats, like MIME-encoded email, HTTP, HTML, and XML, do a fine job of identifying the character set of your text, so that whatever program receives your text will know how to display it. And unlike in the old days, we now have standard character sets capable of representing ...

Get Games, Diversions & Perl Culture 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.