I'd like to enable Spanish as second language on my zenphoto 1.4.12 installation, but Spanish cannot be enabled in the Options -> General -> Language list (the checkbox is grayed out).
I have enabled "Multi-lingual" in Options -> General -> Language, Spanish translations are installed in `zp-core/locale/es_ES/` and `locale -a` lists `es_ES.utf8`.
Current locale setting as shown in toe "Overview" tab is `en_US.UTF8`.
Did I miss anything?
Thanks a lot in advance,
Christoph
Comments
Any errors in the Zenphoto logs or in the server logs?
Besides the request for errors by fretzl: Do you have any other locales on your server that do work?
I checked the normal logs and only found tons of GET requests from zenphoto in "apache2/access.log", but no warnings, errors or failures.
In "zp-data/setup.log" I found the following:
`Warn: PHP setlocale() failed Locale functionality is not implemented on your platform or the specified locale does not exist. Language translation may not work.See the user guide on zenphoto.org for details.`
I also installed German language support (de_DE.utf8) on my server, but same result.
Concerning es_AR: The Spanish locale is called "es_ES" in "zp-data/locale", not "es_AR" (?).
The only thing I could imagine is that during the first installation the only English locale installed on the server was en_IE and not en_US, but my browser requests en_US as locale. Maybe this caused some kind of glitch during installation which prevented enabling other languages (?).
But besides that the default language (that without any translation) of Zenphoto is indeed `en_US`. But you could add an empty `en_IE` folder to the `/zp-core/locale/` folder to enable any locale even without translation files. If there are not translations present you will just get the default English instead. I just looked into the translation file catalog. That's what the authors set back then as they were located in Argentinia. But i think they translated in quite "general Spanish" if I recall talk about that.
Technically the file name should indicated the language. I am offhand just not sure if the PHP gettest functions pay atention to the internal language set within the file somehow, too.
Now I installed Russian (ru_RU.utf8) on the server (and rebooted it in case of need), but Russian can still not be selected under Options -> General -> Language (checkbox is grayed out). It seems that I can only select languages that have been available on my system at installation / setup of zenphoto.
If this is the intended behavior one could maybe mention it on "http://www.zenphoto.org/news/multi-lingual-sites/".
Besides that you of course need the locale installed on your server for the language you wish to use. That's PHP requirement.
That is noted on the multilingual article you linked in a separate box just a bit below in the page. Probably we should move that right to the beginning of the article. Will do that.
Maybe it's not completely clear what I've done:
If you instal a new locale on a server it would not be surprising if you would need to restart the server itself. But Zenphoto's setup should not be related, unless I missed something. But I never isntalled locales on a server as I am not server admin.
I just checked again by installing French locale: the setup step is necessary; plus restarting the server.
To complete my list from above:
- Copy zenphoto to the server.
- Run initial setup.
- Install new locale on server (on my Debian box with `dpkg-reconfigure locales`).
- New language cannot be selected under Options -> General -> Language.
- Restart server (`service apache2 restart` for me)
- Run setup again from Overview -> Utility functions.
- Now the new language can be selected under Options -> General -> Language.
Restarting only the server doesn't do the trick.We could add a section to the article that this might be a reason. but this is not really zenphoto specific I think. gettext and locales are used by a lot of other systems as well.
I just wanted to leave some details in case someone else runs into the same problem and knows how to use a search engine.