Forum Moderators: coopster
All pages are dynamically parsed from a language array and database depending on the users language choice.
eg:
$HTTP_SESSION_VARS['lang'] = 'en'; If this session is not set they are redirected to the index page where the session is set.
My question is what effect will this have on spiders visiting my site? When I try to validate a page at w3.org for example I can't because the validator just gets sent to my index page becuase there is no language set.
Does anyone know of a solution to this problem or have I just done this language thing badly?
Thanks
You need to allow them access to the whole site in every language. links on every page for the same page in the other languages and once they have selected a language they are essentially confined to that part of the tree.
It's funny coopster and I were just chatting about this yesterday, we both do it very differently but they both work very well.
I actually replicate the directory structure and use common templates, so menus and everything are central but all content is stored on individual pages. I like doing it this way and have for years, even if others think it's more work. ;)
jk is correct, I prefer Apache's Content Negotiation. I keep foreign language documents right in the same directory as the base language documents for the site. You can use MultiViews if you would like, but variant files are faster. A bit more work on the front end though.
Then, if you want to make it look your have sub directories of the foreign languages you can do so. SE's will pick them all up because you can have the "Additional Languages" link on your page(s).
Have a look at the Apache docs and dig into the httpd.conf file. You'll learn a lot by just analyzing the way the developers made the Apache manual.
What if I create a subdomain for each language like es.domain.com only making the index of each determining the language. Then submit each domain separatly to SE. Those indexes would then just link to the rest of the "common" pages.
I've tried spidering the site pointing a scanner at the index of each language and it finds the rest no problem in the right language.
Would this solution work seeing as I don't think I'm going to pass Apache's Content Negotiation 101.
Thanks