I was wondering why the language selector uses Javascript?
`
`
Search engines can never index multilanguage pages that way.
I do sumbit the multilang sitemap but untill now nothing of my lingo efforts show up in the SERP's!
I am now changing to just:
`
`
It's the same thing right?
So why the JS??
Comments
I am just wondering why the javascript? The crawler will not be able to follow the links..
And I did submit my multilang sitemap to Google Webmaster and put the link in robots.txt
But again no sign of indexing pages other than the default English.
The site map should contain different links to different language versions. Zenphoto itself does not really care about the url regarding that as the language setting is stored in cookies foreach visitor.
If Google does not follow that I have no idea right now... Porbably the url part of the seo-locale needs to be there anytime if enabled. Will have to talk with sbillard about that.
http://googlewebmastercentral.blogspot.com/2010/09/unifying-content-under-multilingual.html
On the big multilanguage sites the locale is always in the URI like
mysite.com/fr/some-folder
mysite.com/en/some-folder
which is how I would prefer as well.
What happens right now with ZP with these links? The locale is written to the cookie?
I don't see any rewrite rule for these locales in the .htaccess
You can use the locale in every link if the seo_locale plugin is enabled, although Zenphoto does not need it.
However there is no way to enable this locale in the url permanently as nothing generates it.
sbillard is the author of thte seo_locale plugin so he later surely will respond on the technical possibilities. As always if any change will be in 1.4.3 earliest anyway.
I hereby confirm that my multi language pages are NOT indexed by Google, even if my sitemap and robots.txt are submitted correctly. Google can't find the pages.
If I do a Google search for:
`my-other-language-keyword site:mysite.com`
I get zero results..
Changing the language handling would be a quite major thing and result in a lot of incompatibilities.
Just out of curiosity, a major thing rewriting the URL's the mysite/fr/folder/ way?
What about sub domains like in the Google examples you pointed out like fr.mysite/folder/
Zenphoto's urls are not language dependent, the seo locale adds that for switching. Zenphoto stores that in a cookie/session. If you want to have fixed urls for each language the whole url generation internally would have to be change which would make a lot of custom usages in custom themes or plugins possibly.
Just doing this via htaccess will not really work as that does not "know" about any ZP related settings (for example what languages you actually use).
We will try to solve this conveniently for all sides. Sbillard is actually the expert on this.
We made this for users conveniently not machines...;-) Strange is, that no one ever complained before! Either no one uses the multilingual feature or they all don't care...
I was reading some Google documentation and with the `site:somesite.com` search for your keywords you can see if the page is really indexed.
btw I also found a multilanguage issue using the sitemap plugin..
I have the "Google image and video extension" enabled
but when looking in the sitemap-zenphoto-albums-1.xml
I see that the multilanguage captions and titles are not ported.
for example the photo on the page `mysite.com/surfing/surf-7279.jpg.php`
in English has
title: "Surfen 7196"
description: "Surf session on 05/12/2011"
in Dutch
title: "Surfen 7196"
description: "Surf sessie op 05/12/2011"
here is what the sitemap rendered:
`
...
http://mysite.com/en_US/surfing
2012-02-14T17:18:48Z
daily
0.8
http://mysite.com/cache/surfing/surf-7279_900_logo.jpg
Surf 7279
Surf session on 05/12/2011
http://mysite.com/pages/copyright-notice-and-license
mytown, Italy
http://mysite.com/nl_NL/surfing
2012-02-14T17:18:48Z
daily
0.8
http://mysite.com/cache/surfing/surf-7279_900_logo.jpg
Surf 7279
Surf session on 05/12/2011
http://mysite.com/pages/copyright-notice-and-license
mytown, Italy
...
`
Regarding the site map: Thanks, that's indeed a bug!
So, if you can get your .htaccess to deal with the `fr.domain.com` redirection to add the `locale=fr` to the rewritten URI quiry parameters then all will work.
But maybe htaccess tricks help us here.
in line 291
`$meta .= ''."\n";`
`// $lang = strtr($lang, '_','-');`
because the links language is with underscores as from the foreach loop.
that will also add the current active language to the alternate links.
btw... I am just reading on Google Webmaster
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=182192&topic=2370587&ctx=topic sbillard, any more help with subdomain rewrites would be very appreciated..
I am a noob when it comes to .htaccess and rewrite rules.
I did read that his is written on the Google webmaster. As said we made it for people instead of machines and this is not easily changed.
I am sadly no htaccess expert either but I am not sure this will really help since Zenphoto does not care for the url. Once you are within the language it is nowhere added.
My site naturally passes these subdomains to the closest defined subdomain, so all works. But other sites may require that you set up a specific subdomain foreach language.
Sweeeet! I need to try it out this week.
I don't know yet how I can make subdomains with my MAMP install to try, but I'll give it a try..
acrylian, so the current active language should not be included in the alternate links than?
I am getting the nightly!
Thanks guys!
Yes, it should now work as expected. If not just let me know..:-)
Great achievement, thanks so much!
The dynamic-locale plugin to switch the languages still dominates over the subdomain but I think that would not be to difficult to get it to work.
I was thinking what else needs to be changed.. any references to the ?locale variable.
RSS feeds, the sitemap plugin, acrylian's HTML canonical & alternate language meta's,.. Anything else?
Could you maybe tell me where the guts of the code reside?
[EDIT, ok I am just leraning about the Trac, it's here right? http://www.zenphoto.org/trac/changeset/9290]
Could I port them over to my current 1.4.2.1 release?
Are you planning this feature in a future update?
Anyway, just for reference for anyone wanting to add subdomains in a local MAMP install:
1) Edit Mac hosts file
open Terminal and type `sudo pico /etc/hosts`
enter password at the prompt
use the arrow keys to scroll down to the end of the hosts file and add the following lines:
`
127.0.0.1 nl.localhost
127.0.0.1 fr.localhost
127.0.0.1 it.localhost
`
edit entries to match the domain and sub-domains you want to create
add as many sub-domains as needed, now or later
save the file and exit by typing Ctrl+O, Enter, and then Ctrl+X.
2) Edit Apache config file
open /Applications/MAMP/conf/apache/httpd.conf in a text editor and scroll down to the line that says "# NameVirtualHost *"
replace that line with the following code:
`
NameVirtualHost *
ServerName localhost
ServerAlias localhost *.localhost
DocumentRoot "/Applications/MAMP/htdocs/"
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
`
save the file and then restart Apache by clicking “Stop” and then “Start” in the MAMP control panel