Re: Handling Translations



On Thu, 2001-08-30 at 13:39, jeichorn JoshuaEichorn com wrote:
> I've been playing around with stuff for the new Gnome Website,

> You can take a look at http://gnome.joshuaeichorn.com

> I'm using Smarty Templates and the html templates that Joakim created.

> I detect the browser and serve the correct template for the correct browser
> currently, i would like to add support for serving the correct language too.

> I already have language detection down but i need a decision on how
> translations will be handled so i can implement it.

> Currently I has 2 systems for registering the template variables that i've
> been playing with, One loads the variables from an xml file, and the other
> from a php array.  The php_array method would be setup to use gettext
> directiy, the xml method would need an xml file for each supported language
> of cource i could use something like xmli18n tools to create those xml
> files.

It seems to me that both these methods are somewhat complex, and, more
importantly, slow. Now, if we think about the fact that if the template
system works as it should, and actual PHP functions are externalized,
then there won't be any common elements between the different language
pages (apart from headers and footers to call templates.)

So why not just use different pages (PHP files) for different languages?
I believe it's pretty common to use foobar.en.html and so on.

-- 
    Joakim Ziegler - Ximian Engineer - joakim ximian com - Radagast IRC
 FIX sysop - Free Software Coder - Writer - FIDEL & Conglomerate
developer
http://www.avmaria.com/ - http://www.ximian.com/ -
http://www.sinthetic.org/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]