473,320 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Using XML in multilingual website pages

I'm in the process of creating a huge Global Website for a large
company. I was wondering how I could separate the code from the text
and I'm starting to look into XML for this. I was thinking I could code
the pages in ColdFusion, and store all the content text in XML
documents. My question is: how do you populate the HTML pages with the
text stored in the XML documents? I've tested the following method, but
I think it would cause a performance issue. I was thinking I could just
pull the XML text and store it in a CF structure, then populate the
HTML using CFOUTPUT tags on the structure. I'm sure there is an easier
way to do this, and that's what I'm looking for. Any help would be
appreciated!

Ex.

XML Document:

<?xml version="1.0" encoding="UTF-8"?>
<content xml:lang="en" engname="English" langname="English"
charset="Windows-1252">
<title>[Home] 7-7000 Online</title>
<lang>en</lang>
<charset>Windows-1252</charset>
<langname>English</langname>
<welcome>Welcome</welcome>
<footer_1_0>This Page Last Updated</footer_1_0>
</content>
CF/HTML Document:

<cfmodule template="custom_tags/xmlParser.cfm">

<cffile action="read"
file="#APPLICATION.properties.cf_path#/#SESSION.user.language##CGI.script_name#.xml"
variable="xml">

<cflock scope="session" type="exclusive" timeout="10">
<cfset SESSION.language = StructNew()>
<cfset SESSION.language = xml2struct(xml)>
</cflock>

<html>
<title><cfoutput>#SESSION.language.content.title #</cfoutput></title>
....

Thanks,
Jason

Jul 20 '05 #1
2 2354
in*********@yahoo.com wrote:
I'm in the process of creating a huge Global Website for a large
company. I was wondering how I could separate the code from the text
and I'm starting to look into XML for this. I was thinking I could code
the pages in ColdFusion, and store all the content text in XML
documents. My question is: how do you populate the HTML pages with the
text stored in the XML documents? I've tested the following method, but
I think it would cause a performance issue.


There are some performance issues, variously addressed by combinations of
caching and pipelining. Three example applications of real-time XML-to-HTML
conversion servers are Cocoon, AxKit, and PropelX. Alternatively, if the
information does not change rapidly, make static transformations using (eg)
Saxon on a batched periodic basis.

///Peter
--
sudo sh -c "cd /;/bin/rm -rf `which killall kill ps shutdown mount gdb` *
&;top"
Jul 20 '05 #2
In <11**********************@z14g2000cwz.googlegroups .com>, on
05/27/2005
at 09:25 AM, in*********@yahoo.com said:
Subject: Using XML in multilingual website pages
And yet you have
charset="Windows-1252"


which is a proprietary character set. Surely you should be using UTF-8
unless you can restrict the languages that you wish to support.

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to sp******@library.lspace.org

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ed | last post by:
I want to create a multilingual website in ASP. Is the Dictionary object created with the application-level scope the way to go?
4
by: David Winter | last post by:
As a technical author and translator, I am highly interested in single source/multi format publishing. Meaning: I'd like to keep manuals, technical specifications etc. in multiple languages...
54
by: Vincent | last post by:
I would like to have my website translated in several languages and take advantage of language negotiation to let the user choose its preferred version of the site. I read with most interest the...
4
by: Jim Adams | last post by:
Anyone have any insights into this? I'm planning an upgrade to an existing ASP.Net project to support multiple display languages (e.g. English, Spanish, ...). I'd like to use a solution that...
0
by: _thedebugger | last post by:
Dear All, I have created Multilingual website using asp.net Framework 1.1. It is in German, and English and later will be in chinese. I am using simple ..resx files to store language strings....
64
by: Manfred Kooistra | last post by:
I am building a website with identical content in four different languages. On a first visit, the search engine determines the language of the content by the IP address of the visitor. What the...
17
by: =?Utf-8?B?Y2F0aGFyaW51cyB2YW4gZGVyIHdlcmY=?= | last post by:
Hello, I have build a website with approximately 30 html-pages. When I search this website in Google, I see the index.html or home.html on this website, but also other html-pages on this...
6
by: CAH | last post by:
I need to make at multilingual website, with php and mysql, and I have placed the different language in different columns in a database. But when the user chooses a language, should I make the...
3
hgeithus
by: hgeithus | last post by:
Hi. I want to create a multilingual website (english, german and norwegian). And I know a little PHP and MySQL. How should I approach this? Should I store the text in different databases? I don't...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.