For Programmers: Free Programming Magazines  


Home > Archive > PHP Questions and Answers > March 2006 > A website in 2 languages









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author A website in 2 languages
MetalShark

2006-03-22, 6:23 pm

Well, I am programming a web side and I want to provide 2 languages ( English and German ) to the users. To get that realized, I wanna use a XML file with the whole content for the both languages and than just parse the right text to the page the viewer is in, in his language – the pages will track the language thru a session variable.
the XML file would look like
The question is: Does anybody can help me with the parsing thing?
Well, I saw some examples of parses on the PHP.NET website but none of those worked for me – not really!
Does anybody that already did something like mind give me a simple but clear example of the whole?
Thanks in advance

MetalShark.
MetalShark

2006-03-22, 6:30 pm

the XML file look more or less so:
code:
[website] [german] [index] [content]German Text[/content] [/index] [/german] [english] [index] [content>English Text[/content] [/index] [/english] [/website]
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com