Re: Multi-language and Smarty

From: Date: Tue, 29 Jan 2002 14:23:02 +0000
Subject: Re: Multi-language and Smarty
References: 1  Groups: php.smarty.general php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2598@lists.php.net to get a copy of this message
I see a problem with this kind of implementation. If you want to put variables in your messages? Like: "Welcome $name" How do you handle it with .conf files? -- Valerio Santinelli HateSeed.com Founder (http://www.hateseed.com) In Flames Italia Webmaster (http://www.inflames.it) My Lab (http://tanis.hateseed.com) ----- Original Message ----- From: "Andrei Zmievski" <andrei@ispi.net> To: <smarty@lists.ispi.net> Cc: <smarty@lists.ispi.net> Sent: Tuesday, January 29, 2002 3:20 PM Subject: [smarty] Re: Multi-language and Smarty > That is the approach that we will most likely be using for i18n in our > flagship Vnews application. > > On Tue, 29 Jan 2002, Raymond Penners wrote: > > One approach we are taking at our company is the following: > > > > --8<--[example.conf]--8<----8<----8<----8<----8<-- > > [en] > > message="Message" > > other=... > > > > [de] > > message="Meldung" > > other=... > > > > [nl] > > message="Bericht" > > other=... > > --8<----8<----8<----8<----8<-- > > > > --8<--[example.html]--8<----8<----8<----8<----8<-- > > {config_load file="example.conf" section="$language"} > > <html> > > <body> > > {#message#} > > </body> > > </html> > > --8<----8<----8<----8<----8<-- > > > > --8<--[example.php]--8<----8<----8<----8<----8<-- > > // Fancy function that parses HTTP_ACCEPT_LANGUAGE > > // and returns one of 'en', 'de', or 'nl'. > > $language = getLanguage(array('en','de','nl')); > > > > $smarty = new Smarty(); > > $smarty->assign('language', $language); > > $smarty->display(); > > > > --8<----8<----8<----8<----8<-- > > > > -- > > Raymond Penners -*- raymond@dotsphinx.com -*- www.dotsphinx.com > > > > > > --- > > You are currently subscribed to smarty as: andrei@ispi.net > > To unsubscribe send a blank email to $subst('Email.Unsub') > > Visit Smarty's homepage at > > http://www.phpinsider.com/php/code/Smarty/ > > > > -Andrei > * We are not a clone. * > > --- > You are currently subscribed to smarty as: tanis@mediacom.it > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ > >

« previous php.smarty.general (#2598) next »