I have worked on a fairly large website where we were faced with a similar
problem.  The 'ultimate' solution is to upgrade to a newer version of CF and
then store all of your text as Unicode, but if you can't do that, then you
can do what we did, just realize it is not easily upgraded once you start.

 

1.  For page text (non-dynamic) we used cfif statements around cfincludes.
Each include would hold variables that were translated into each of the
different languages.  Eg .  To get the work 'home' to appear on the page it
would be

<cfif lang eq "us">

      <cfset home="HOME">

<cfelseif lang eq "jp">

      <cfset home="{Japanese characters for home}">

</cfif>

<cfoutput>#home#</cfoutput>

We used utf-8 for English and other latin based languages and shift-JIS for
Japanese.

 

For the database, each item would have a separate column for each language.
Eg.  title-en, title-jp, title-kr ...

The text was entered into the database using a computer that was setup for
the appropriate language charset (we had different computers for each of the
languages)

 

You will need to test a bit to get the pages working well, but this is how
it worked for us on CF5.

 

I can tell you that I would never create a new system using this method.
What we found out is that the charsets that were in CF5 which supported our
method were not included in CF6.1 or CF7 (which is why that system is still
not updated)  I don't know about CF8.  I would prefer to use the Unicode
method as it is upgradeable and expandable.

 

William

 

 

-- 

William E. Seiter

 

Have you ever read a book that changed your life?

Go to: www.winninginthemargins.com

Enter passkey: goldengrove

-----Original Message-----
From: NUGROHO NOTO [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 04, 2007 6:19 PM
To: CF-Talk
Subject: Multi language page

 

Sorry again for this simple question... this community has helped me A LOT,
so many members gave me precious advice....so... here I am again.

 

we already have a website in Japanese (running coldfusion 5 english version)

Now... we need to modify them to support multi language (japanese and
english)

since we are on CF 5 server (which I was told do not support XML
??)..so..what is the best way to store those language text ? 

is it in database, and call the query text based on session language ? 

or... just hardcode these language in each page and use <cfif> to choose the
language to display the output.

I don't mind hardcode them (eventhough it might be difficult to correct), my
purpose is the fastest coldfusion can process. 

I am wondering if using too many <cfif> <cfelse> too many in a page will
affect performance ? 

Thanks. 

 

 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290271
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to