Hi Erki,
Thanks for your email. One more question. How do you deal with image buttons
and graphic files?
Regards,
JK
----- Original Message -----
From: "Erki Esken" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 16, 2002 1:44 PM
Subject: Re: FuseBox and multi language sites
> > Is any impact of FuseBox technology on designing multi language
> > sites? Any best practice approaches?
>
> Good you asked, since I'm in the middle of writing (actually rewriting)
> an app, that must support different languages.
>
> It used to work like this - every template that had some language
> elements <cfinclude>'d a language configuration file for that template.
> So if dsp_homepage.cfm needed some elements in different languages,
> it had <cfinclude template="language/#client.lang#/dsp_homepage.cfm">
> and that lang file had this in it:
>
> <cfscript>
> lang_title = "Whatever";
> lang_foo = "bar";
> </cfscript>
>
> And so the dsp_homepage.cfm displayed language elements with #lang_title#
> etc.
>
> But it was ugly to maintain the language files. So I totally redesigned
> it. Now I have all the language stuff in a WDDX file and I load it into
> application.languages variable on the first run. Then I include a
> lib_language.cfm file in home circuit fbx_settings.cfm. lib_language.cfm
> initializes two UDF's: lang() and langcopy().
>
> When I need some language elements - I call them language tokens - I have
> this in that template:
>
> <cflock scope="APPLICATION" type="READONLY" timeout="5"
throwontimeout="No"><cfset langcopy()></cflock>
>
> After that I use #lang('token_name')# to get that token.
>
> langcopy() uses GetCurrentTemplatePath() and client.lang to copy necessary
> tokens from application scope to local variables.language struct. Then
lang()
> just tries to find the specified token in that variables.language struct.
>
> It may seem a bit complicated at first, but it's really easy to work with
> when it's all set. I also built a web based language token editor (see the
> attached screenshots) so you can change the tokens on-the-fly, even when
the
> site is live.
>
> .erki
>
==^================================================================
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]
T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================