PHP Externalization of Messages

As part of a project we are involved in there is a need for externalization of messages, both error and labels from the application into an external file.

From within Java, this is available as message and resource bundles, and the Spring framework smoothens this process.

In PHP this is another story, as the options are:

a) gettetxt – http://www.php.net/manual/en/book.gettext.php

b) Zend Translate – http://framework.zend.com/manual/en/zend.translate.html

Since this is not a very large application, we will be using ini files with the message keys encoded as english strings based on analysis at http://stackoverflow.com/questions/216478/gettext-is-it-a-good-idea-for-the-message-id-to-be-the-english-text

I will see how that one proceeds along

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: