HTML coding for languages |
HTML coding for languages |
classyred |
Aug 14 2011, 09:02 PM
Post
#1
|
Group: Members Posts: 5 Joined: 14-August 11 Member No.: 15,178 |
Hi, I starting going to college for Graphic Communications and one of my many interests is web design. I am making a website and I have no idea how to create code for the html that allows visitors on the site to click on different given languages and change the language the site is seen in.
I looked some information up on this and it was really complicated and involved code I've never seen or know how to use... I was wondering if someone could explain it to me and or show me how this can be done step by step. Thanks A LOT!!!! |
pandy |
Aug 14 2011, 09:27 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Are we talking about static pages that you are going to create in several languages? If so, just link to the other language versions.
|
classyred |
Aug 14 2011, 09:30 PM
Post
#3
|
Group: Members Posts: 5 Joined: 14-August 11 Member No.: 15,178 |
I'm not quite sure. Sorry. I was trying to figure out how to actually do it with html or something on a website.
By like... listing the languages in small fonts and enabling visitors to click them to change the language they clicked... Sorry if that isn't helpful. |
Darin McGrew |
Aug 14 2011, 11:11 PM
Post
#4
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Well, one way is to have different versions of the HTML files, and to link between them. For example:
http://htmlhelp.com/faq/html/ (English) http://www.htmlhelp.com/nl/faq/html/ (Nederlands) http://www.htmlhelp.com/fr/faq/html/ (Français) Another is to drive everything from a database, and to produce different content from the database. For example: http://www.google.com/webhp?hl=en (English) http://www.google.com/webhp?hl=nl (Nederlands) http://www.google.com/webhp?hl=fr (Français) |
classyred |
Aug 15 2011, 04:36 PM
Post
#5
|
Group: Members Posts: 5 Joined: 14-August 11 Member No.: 15,178 |
Well, one way is to have different versions of the HTML files, and to link between them. For example: http://htmlhelp.com/faq/html/ (English) http://www.htmlhelp.com/nl/faq/html/ (Nederlands) http://www.htmlhelp.com/fr/faq/html/ (Français) Another is to drive everything from a database, and to produce different content from the database. For example: http://www.google.com/webhp?hl=en (English) http://www.google.com/webhp?hl=nl (Nederlands) http://www.google.com/webhp?hl=fr (Français) Thanks, the first method is probably the easiest one for me to use, though it probably takes longer. |
pandy |
Aug 15 2011, 06:44 PM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Then you just need to link to your translations. I don't think that it necessarily is more work. You need to write the translation either way.
|
Frederiek |
Aug 16 2011, 03:30 AM
Post
#7
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
It's the easiest way if you don't know PHP. The site has to be copied for as many different laguages as there will be. It's quite a hassle to go into every page and make translations there. Using PHP, you'd have one file for each language and only add the translations there.
If you want to look into a PHP way, try searching for "php multilingual website". One of te results explains it quite well: http://www.bitrepository.com/php-how-to-ad...-a-website.html . |
raydin |
Aug 16 2011, 06:35 AM
Post
#8
|
Newbie Group: Members Posts: 15 Joined: 13-August 11 Member No.: 15,164 |
It's not that hard using PHP. You use GET variables " Variables that are in the links" to change the languages around.
Then, you tell your website to get a specific file if a specific language " the variable" is there. |
Brian Chandler |
Aug 16 2011, 02:27 PM
Post
#9
|
Jocular coder Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 |
It's the easiest way if you don't know PHP. The site has to be copied for as many different laguages as there will be. It's quite a hassle to go into every page and make translations there. Using PHP, you'd have one file for each language and only add the translations there. If you want to look into a PHP way, try searching for "php multilingual website". One of te results explains it quite well: http://www.bitrepository.com/php-how-to-ad...-a-website.html . I think the method outlined on that page is completely impractical, unless your entire website consists of pages with about six phrases each. Having an array called $lang that might just have completely different values seems backwards to me at least. |
Lo-Fi Version | Time is now: 25th April 2024 - 08:37 PM |