Menu:

Delicious!

arrow Drawing with jquery

arrow Mobile applications RIP

arrow Lighthttpd tuning

arrow Kännykästä WLAN tukiasema

arrow MySQL advanced performance tips

 left_thumb_25102008-002.jpgleft_thumb_24102008-032.jpgleft_thumb_24102008-015.jpgleft_thumb_24102008-013.jpgleft_thumb_20092008.jpg 

Dezign
(4 Janv, 2007)

Midcom 3 does now gettext

Posted on 2008-07-17 12:18:20 EEST.

Last days when I've had some time I've been thinking about implementing finally the gettext support for MidCOM 3. Now it's finally done. Some cleaning up things with templating may be required.

Gettext UI localization should be context safe, every component has it's own translator context and naturally all translations happen per component level.

As a component developer point of view it requires setting the locale - folder inside the component. There is a normal gettext folder structure. Currently system only supports "default" language that is configured at midcom_core's confifuration until i18n service has been implemented in order to change UI language more easily.

Usage at TAL is quite simple. Just put for example <div i18n:translate="string:welcome_message">Welcome here</div>. String:welcome_message is the string found in translation files.

More information about TAL namespacing  and TAL-gettext
And usage of gettext itself http://www.onlamp.com/pub/a/php/2002/06/13/php.html

Have fun!

Related stories

Back