fullyloaded Posted January 10, 2007 Share Posted January 10, 2007 hii want to add french german etc..language to my site but dont have and idea what to do or where to start will this be a big job to do?and info would be great thanks Link to comment https://forums.phpfreaks.com/topic/33551-language-for-website/ Share on other sites More sharing options...
DarkendSoul Posted January 10, 2007 Share Posted January 10, 2007 Well theres a few ways to do this that I can think of.Option 1 :Different folders for each language. Like such:www.yourweb.com/en/index.phpwww.yourweb.com/fr/index.phpwww.yourweb.com/gr/index.phpetcOption 2 :At the top of the page you could have it read files depending on which language you want, and instead of putting normal text you would have to echo variables. These variables change from file to file depending on what files are opened.Option 3 :Like option 2 but instead all the text is saved to a database in a format like so...[font=courier new]+----+----------+-----------+---------+| id | language | fieldname | text |+----+----------+-----------+---------+| 1 | french | mainText | le bleh || 1 | english | mainText | bleh |+----+----------+-----------+---------+[/font]Then retrieve and display each field name depending on which language they selectedOption 4 :Downloading some obscure PHP script to translate text, ending up with babble fish text that is only understandable in the language it was first written in.* Option 2 and 3 would most likely need cookies to save which language the user selected. Option 1 would be the simplest and least confusing for a first timer. Option 3 would be what I would go with personally because I believe that I could make a pretty spiffy page program. Option 1 would be vary difficult when you need to edit something though. Link to comment https://forums.phpfreaks.com/topic/33551-language-for-website/#findComment-157118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.