![]() | |
| |||||
| I'm about to start work on a new project of mine and i want to build in the future functionality of multiple languages. The way i have it in my head is that i would have a select field on every page with the different menu options and using AJAX, when a user changes the language on any page the new language will follow the user throughout the site until changed again. Example: The index.php page has a default of English so it loads with the en.php file which holds all site variables in English. Once the language has been changed the the session variable that was set to en.php by default will change to the new language French by putting the fr.php into the language session variable. The problem is how do i refresh the page without reloading it completely. The reason being i cant see a way that the AJAX can reload all the page variables or am i wrong. If i enclosed the whole site in a span would it refresh upon a new language being selected? Any help appreciated as always. |
| |||||
| really I'd forget about using ajax to do this .... whats the advantage over just reloading the complete page ? Yes it sounds cool .... I've got the languages tied into an ajax refresh mechanism ... You're going to have to give all of your strings id's and update them all .. which means loading the new language file completely and doing lots of parsing ... personally I think its better to do it server side.
__________________ Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it ) Recent Work: Safari Club African Safari Holidays - South Africa Safaris Other Stuff: FluffyLinkulator Rapid Inclusion Service Tools |
| |||||
| It's best to use a directory structure too rather than passing variables on an index.php file or similar. A directory is more semantically structured and can you can geo-target a directory a lot easier than something like index.php?lang=en. en.site.com / fr.site.com or site.com/en/ site.com/fr is the way to go. Be sure to the ISO Country identifiers (fr/de/en/es/it/jp). I setup something similar a few weeks ago with Wordpress MU. I have an English and Polish blog running off the same system. ammado blog + Polski blog ammado |
| |||||
| Quote:
Quote:
|
| |||||
| Quote:
If you're planning on having en.site.com or site.com/en ... then having the page stay the same but changing language is a bit crazy no ? For indexing purposes as well ... having Javascript links to the other languages isn't really ideal.
__________________ Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it ) Recent Work: Safari Club African Safari Holidays - South Africa Safaris Other Stuff: FluffyLinkulator Rapid Inclusion Service Tools |
| |||||
| Quote:
Personally I prefer subdirs, but little or no difference for most sites.
__________________ Search Engine Optimisation - Red Cardinal Internet Marketing Internet Consultant Ireland | Search Engine Optimisation Services Catering Company Dublin - My sister's handmade canape company! |
| |||||
| Quote:
|
| ||||
| dont know if it interests you (and there are other versions of this type of thing) but i was researching the building of a site (2 languages) in the joomla CMS ...... and i came accross an interesting plugin called joomfish - it doesnt do translations but acts as a sort of translation management system --- seemed to be pretty good and i'd say it would be what i would use if i was doing a multilinugal site |
| |||||
| Quote:
|
| Thread Tools | |
| Display Modes | |
|
|
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multi Language Sites | SineadOD | Search Engine Optimisation | 8 | 26-04-2008 08:22 AM |
| Ok So I Went Crazy - Review My Design Site | Baz | Site Reviews / Announcements | 26 | 27-03-2008 05:40 PM |
| Successful Site in 12 Months with Google Alone | montyauto | Webmaster Articles | 11 | 18-02-2008 12:28 PM |
| Multi Language Sites & SEO | searchcreations | Search Engine Optimisation | 12 | 07-01-2008 09:34 PM |
| multi language site | matrixroyal | CMS and Content Management | 2 | 27-03-2007 05:00 PM |