News Feed
Sections




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

SitePoint PHP Blog:
Managing Gettext Translations on Shared Hosting
February 11, 2014 @ 13:09:19

On the SitePoint PHP blog today Aurelio De Rosa makes some recommendations about handing gettext translations on shared hosting. The problem with shared hosting is the need to reset the web server (Apache) to get it to read the updated translation files. His workarounds uses an external script that can dynamically pull in the latest translations without the restart.`

For serious translations we can use Gettext. This approach enables us to have different files for every targeted language which helps in maintaining separation between the business logic, the presentation layer, and the translations (which we can see as an add-on of the presentation layer). With Gettext, we can parallelize the process because while we're working on some features of the website, translators can still work on translations using software like gettext functionality to set the current language and extract a "HELLO_WORLD" string. He then moves on to the use of the Audero Shared Gettext library. This library creates a "mirror" of the translation file requested and forces those updates into the current domain. Code examples of its use are included showing a basic pull and merge process.

0 comments voice your opinion now!
gettext tranlsation dynamic loading webserver shared hosting tutorial

Link: http://www.sitepoint.com/managing-gettext-translations-shared-hosting

blog comments powered by Disqus

Similar Posts

Hiveminds: How to Bridge PHP and Java for Powerful Web Solutions

DevShed: The Basics of Using the Factory Pattern in PHP 5

Till Klampaeckel's Blog: Yahoo: oauth_problem=consumer_key_rejected

DevShed: Introducing the Facade Pattern in PHP 5

Lorna Mitchell's Blog: POSTing JSON Data With PHP cURL


Community Events





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


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

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