Creating a Localized Page Structure
In this section, you look at a functioning example of a localized welcome page that uses PHP to enable a user to select a target language and then receive the appropriate text. The goal of this section is to show an example of externalizing the strings used in this script, which is one of the characteristics of internationalization.
In this script, the user happens upon your English-based Web site but is also presented with an option to browse within the locale of his choice—English, German, or Japanese. Three elements are involved in this process:
Creating and using a master file for sending locale-specific header information
Creating and using a master file for displaying the information based on the selected ...
Get Sams Teach Yourself PHP, MySQL® and Apache All in One 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.