I have a problem with Google indexing our site in different languages using the alternate hreflang. It's a forum and every thread is translated in the background and based on the language, the user choose in his options, the original text is replaced by the one in the right language. So every User can write in his own language and the other users can still read it (somehow - I know it's not the best solution, but it was not my idea :D )
So - now we have the forum in many languages and of course we want the users form every language to find us via google.
So i created some php-files, which get the right language by php and not by javascript. So the head in the original file looks like this:
<link rel="alternate" hreflang="de" href="myurl/printthread.php?t=2967&lang=de"/>
<link rel="alternate" hreflang="en" href="myurl/printthread.php?t=2967&lang=en"/>
<link rel="alternate" hreflang="fr" href="myurl/printthread.php?t=2967&lang=fr"/>
<link rel="alternate" hreflang="es" href="myurl/printthread.php?t=2967&lang=es"/>
On this pages the language is shown in the right language based on the url not on the users choice so that google can index it.
But you guess it - For some reason it does not work. Google only saves the content from the original file - not the alternate files for the different languages :(
You have any idea?