News Feed
Jobs 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

Stephan Hochdörfer: Silex running on HHVM

PHPBuilder.com: Testing with the Zend Framework: How to Get Started

Nadeau Software: PHP tip: How to get a web page using CURL

Codewalkers.com: New Tutorial - Coding \"Best Practices\" - or at least \"Better Practices\"

DevChix: Getting started with YUI's Connection Manager in Rails and PHP


Community Events











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


framework release opinion symfony2 security hack code overview composer hhvm facebook example component language application introduction unittest podcast package install

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