News Feed
Sections




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

PHPMaster.com:
Localizing PHP Applications "The Right Way", Part 5
November 25, 2011 @ 14:58:09

PHPMaster.com has posted the fifth part of their "Localizing PHP Applications 'The Right Way'" series, this time with a focus on extracting data from the .pot template files to define in your PHP. (This is the final part of the series.)

In Part 4 you learned how to use gettext for one of the most complex aspects of localization a developer can face, plural forms. In this, the final part of the five-part series, I'll teach you how you to automate part of the localization process by extracting msgids and generating a PO template file (.pot) from your application's PHP code.

They show how to use the xgettext command-line tool to pull out strings from your source and automatically make them into a domain template. They help you set up three sample PHP files and run the xgettext command on them to pull out messages defined in the text of the files to set up keys in the template. Screenshots are included showing how to use Poedit to use these templates for your new translations.

0 comments voice your opinion now!
localize xgettext tutorial gettext extract


blog comments powered by Disqus

Similar Posts

SitePoint PHP Blog: IronMQ and Laravel: Implementation

NetTuts.com: How to Use New Relic With PHP & WordPress

Matthew Weier O'Phinney's Blog: Responding to Different Content Types in RESTful ZF Apps

DevShed: Using the spl_autoload() Functions to Build Loader Apps in PHP

SitePoint PHP Blog: How to Create a Laravel CSS-Minify Command


Community Events





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


bugfix series voicesoftheelephpant introduction release framework deployment api podcast library list tips language package install laravel opinion symfony community interview

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