Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read info from XML file in browser

Status
Not open for further replies.

jgonc

Programmer
Aug 10, 2010
4
0
0
PT
Hello everybody, this is my first post at tek-tips!

I am a complete newbie concearning using XML with HTML.
I know already a bit of XML structure so the problem is more or less like a Hint. Here's the conception I am thinking of:

I have completed a webpage but its main contents force me to have a multilanguage website. What is the best way to program it? Using 2 XML files (One language and the other one another language) or there's a simple way-out off redundancy and hardcoding the HTML pages? Just one XML file?

I've started the XML structure already:

<?xml version="1.0" encoding="ISO8859-1" ?>
<portuguese>
<cabecalho>Benvindos!!!
</cabecalho>
</portuguese>
-----------------------------------------------------------
<?xml version="1.0" encoding="ISO8859-1" ?>
<english>
<cabecalho>Welcome!!!
</cabecalho>
</english>

Thanks in advance.
 
[0] I don't see iso8859-1 encoding would be appropriate in an extensible multilingual perspective.

[1] If the issue involves just a welcoming message, you can sure put every possible welcome in one xml document (rather than one for each language) and retrieve the pertinent one when the target language is determined. This all happens server-side.

[2] Constructing multilingual web sites has many issues to face as challenges. It would be too simplistic to have them reduced to mean a couple of xml documents. You probably have to ask our specialized forums for advices.
 
Thanks Tsuji. I wish it was, but off course it isn't just a welcome message, that was just a simple example.

I was thinking in using one XML file for each language.
And what's appropriated instead of ISO8859-1?
 
Would feel more comfortable with utf-8, I think.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top