Re: Flexy and localization

From: Date: Mon, 08 Sep 2003 23:57:28 +0000
Subject: Re: Flexy and localization
References: 1  Groups: php.pear.general php.pear.general 
Request: Send a blank email to pear-general+get-7658@lists.php.net to get a copy of this message
There is a brief note on the config page about it.. (re:locale) http://pear.php.net/manual/en/package.html.html-template-flexy.configuration.php basically - if you use the locale option, it will compile the template mytemplate.html -> mytemplate.html.{locale}.php All text elements in the template are run through gettext() eg. <title>this is the title</title> "this is the title" is passed through gettext() to produce the final template. <title>this is the translated title</title> ** this translation only happens at compile time So if you can figure out gettext(), - You should be able to maintain a large number of translations 'relatively easy' In theory it would be possible to replace gettext with a user defined method.. - but I've not looked into that... - (patches accepted..) Regards Alan Kjetil Wikestad wrote:
I'm building a site using Flexy templates and I want to have different languages available for users. I have been thinking a lot on how to implement this and I'm still not sure of the best way of doing this. Are there anybody that have experience with Flexy and localization? How have you solved it? I have searched this newsgroup and read some posts about the gettext function, but it was to abstract for me. So....if somebody could please explaine me how gettext works in Flexy... -- Kjetil W.


« previous php.pear.general (#7658) next »