News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPBuilder.com:
Localizing a Web Page for Different Languages
October 11, 2006 @ 15:36:00

PHPBuilder.com excerpts once again from the Sams Publishing book "PHP 5 in Practice" today with this new tutorial showing a method for localizing web pages for different languages.

Internationalization and localization of a web page is simply the act of setting it up to be able to handle displaying in multiple languages and adding those different languages in. There are many different ways in which to do this. One of the simplest is to just make sure that all your strings that you ever output are stored as variables or constants in an included file. That way, you can make multiple copies of that file,each with different language versions written into them. Just include the appropriate file for the language that you want to display.

They show the creation of the different language PHP files that will be included and the master "language.php" that works with the under's input to switch to the correct language (and set a cookie to save the preference).

3 comments voice your opinion now!
localize different language page include cookie localize different language page include cookie


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: The ABC's of PHP II - What do I need to make it work?

PHPBuilder.com: Using Ajax with PHP to Create an Interactive Web Page

Jaisen Methai's Blog: Stop including class files and use __autoload() instead

Nikita Popov's Blog: Understanding PHP's internal function definitions (Part 2)

Developer.com: 10 Experimental PHP Projects Pushing the Envelope


Community Events





Don't see your event here?
Let us know!


introduction zendserver api bugfix deployment tips series podcast interview community framework developer laravel conference library symfony list voicesoftheelephpant release language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework