Google and your users will love if you follow standards. There's a reason the browser tells you which languages the user prefers, and in which order.
Only html needs to be translated of course, not css, javascript, pics, etc. Partly for that reason, the standard way to do it is to add a language suffix to the filename, such as index.html.de for German. Then just turn on content negotiation and Apache will do the rest.
People much smarter than either of us spent several years designing the standard system. Then other really smart people did a lot of work to make sure that Apache and all of the browsers work well with the standard. Anything you or I come up with eil such compared to what thousands of really smart people have already done for us, so don't reinvent this. It's already fine really well and it's called content negotiation.
See the mod_negotiation docs for other options besides adding a suffix to the file name. Seriously though, people who really know their stuff have put probably thousands of hours into making a system that works really well and you get it for free just by turning the feature on in Apache if it's been turned off. They thought of things like caches. When a Canadian ISP caches your home page, should it be the English version or the French? mod_negotiation makes sure that the ISP cache shows the right thing to the right user. That also makes google.fr very happy.
|