Re: [htmltmpl] language support => the Koha experience

2004-09-01 Thread Paul POULAIN
Martin Sarfy wrote: Hi folks, I lack multiple language support in HTML::Template. Hi, (back from holidays, hence the late answer) The Koha project (www.koha.org) uses HTML::Template. and has several languages (english, french, polish, chinese, others to come) To do this, we wrote a script that

Re: [htmltmpl] language support

2004-08-29 Thread Cees Hek
Markus Spring wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin Sarfy wrote: | Hi folks, | | I lack multiple language support in HTML::Template. ..SNIP.. 3 is done by subclassing HTML::Template to recognize filter arguments as a part of the cache key (idea and code from Cees Hek), so tha

Re: [htmltmpl] language support

2004-08-27 Thread Martin Sarfy
On Fri, Aug 27, 2004 at 03:33:23PM +0200, Markus Spring wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Martin Sarfy wrote: > | Hi folks, > | > | I lack multiple language support in HTML::Template. > > My way to do it is as following: > > 1 Have Templates in one basic language > 2 U

Re: [htmltmpl] language support

2004-08-27 Thread Markus Spring
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin Sarfy wrote: | Hi folks, | | I lack multiple language support in HTML::Template. My way to do it is as following: 1 Have Templates in one basic language 2 Use Locale::Maketext as basic functionality to retrieve localized text strings 3 Use templa

Re: [htmltmpl] language support

2004-08-25 Thread Alex Kapranoff
* Martin Sarfy <[EMAIL PROTECTED]> [August 24 2004, 23:23]: > > > Using construct isn't appropriate for several reasons: > > > -- $lang is not accessible in context > > Use global_vars and it will be. > It's good that global_vars is not set by default, clean namespace in > is advantage and I

Re: [htmltmpl] language support

2004-08-24 Thread alan
> On Tue, 24 Aug 2004, Martin Sarfy wrote: > > Using construct isn't appropriate for several reasons: > > -- $lang is not accessible in context > -- it's too clumsy for manual writting > -- is not 'system' solution, it cannot handle e.g. > substitution of similar languages or so. H

RE: [htmltmpl] language support

2004-08-24 Thread Frederic Hurtubise
Here's the solution I applied to this program in a project of mine. In my templates, I prefix my tokens with lang_. e.g.: , , etc... Then, I overloaded HTML::Template and used my own new method to which, on top of the usual HTML::Template parameters, I pass the language I want to use. In there,

Re: [htmltmpl] language support

2004-08-24 Thread Martin Sarfy
On Tue, Aug 24, 2004 at 12:07:32PM -0400, Sam Tregar wrote: > On Tue, 24 Aug 2004, Martin Sarfy wrote: > > > Using construct isn't appropriate for several reasons: > > > > -- $lang is not accessible in context > > Use global_vars and it will be. It's good that global_vars is not set by defa

Re: [htmltmpl] language support

2004-08-24 Thread Alex Kapranoff
Mark, first of all, thank you for a wonderful piece of expirience! Your way of separating things definitely worth attention. I'm going to try it for my next i18n-enabled project. One little thing I'd like to mention. Let us all use full locale names instead of ISO language codes. de_DE.ISO8859-1

Re: [htmltmpl] language support

2004-08-24 Thread Mark A. Fuller
From: Sam Tregar <[EMAIL PROTECTED]> >> -- it's too clumsy for manual writting > >I don't understand what you mean by this. If you consider >HTML::Template's syntax to be too clumsy then why are you using it? I understand what he's saying. When initially facing the chore of international langu

Re: [htmltmpl] language support

2004-08-24 Thread Sam Tregar
On Tue, 24 Aug 2004, Martin Sarfy wrote: > Using construct isn't appropriate for several reasons: > > -- $lang is not accessible in context Use global_vars and it will be. > -- it's too clumsy for manual writting I don't understand what you mean by this. If you consider HTML::Template's

Re: [htmltmpl] language support

2004-08-24 Thread Carl Franks
An alternative that I use: In the template file, use a simple VAR tag, Store all the different language's text in a database or text files. In the CGI, load the appropriate language based on input parameters or cookie value, my $lang = $cgi->param('lang') || 'en'; my $gui = load_gui ($lang); T

[htmltmpl] language support

2004-08-24 Thread Martin Sarfy
Hi folks, I lack multiple language support in HTML::Template. My idea is that I wrote complete HTML page with tons of design included and then wrap pieces of text using e.g. Hello Ciao Ahoj How do you solve this problem? Using construct isn't appropriate for severa