View Single Post

  #4 (permalink)  
Old 11-04-2008, 10:58 AM
ziycon's Avatar
ziycon ziycon is offline
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 410
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon Send a message via Skype™ to ziycon
Default

Quote:
Originally Posted by Forbairt View Post
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.
So maybe just have a JS onchange function for the select box and once that function runs just have a reload page statement and change the session variable for the language!?

Quote:
Originally Posted by Cormac View Post
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
Was planing on something along the line of site.com/en/, is there much difference or is it better to use a subdomain like en.site.com over site.com/en/?
Reply With Quote