Re: Flexy and localization

From: Date: Mon, 08 Sep 2003 12:56:12 +0000
Subject: Re: Flexy and localization
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7635@lists.php.net to get a copy of this message
Maybe I am not thinking in the right line here, but are you planning on already having the items translated? If you developed a method of detecting where they were from (maybe cookie based? Or maybe use Net_Traceroute) and then do something like this... $lang = whatever you determine; $output = new HTML_Template_Flexy(); $output->compile("./templates/mytemp." . $lang . ".tpl"); $output->outputObject($this,$this->elements); The same could work for the vars you set too, maybe parse an XML file based on the language? I'm not familiar with the package, but there is a translation package available, consider exploring that. Internationalization is documented very well by PEAR so I'm sure you'll find what you need... second thought, better hope they've got good inline docs. Maybe run PhpDocumentor first on em and see what you get. - Stan 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 (#7635) next »