What the message says, your server does not support the english US locale. But that should not really matter since english is the default language you would get to see even if you had no language selected. Please see also here: http://www.zenphoto.org/2008/08/troubleshooting-zenphoto/#24
Under 5. you can download a script to see what locales your server supports.
Did you run the script acrylian suggested? What language locales does your server support? If your server does not support the locale en_US you will get this error if you select English (US).
That's a server configuration. I don't know what is involved in installing a new locale. In your case, no locales are supported. The first set of output is the prefered language your browser requests.
That would be because there was no error message on 1.1.7. The `setlocale()` still failed. We just did not have any indication of why the language selection did not work.
Hi, I'm having the same problem with en_us, i.e.: `Locale functionality is not implemented on your platform or the specified locale does not exist. Language translation may not work.`
Furthemore I have a warning when I try to change the language (from/to whatever) in amin>options>gallery configuration: ` Notice: Undefined variable: locale in /home/web/www.*****.it/www/zp-core/admin-options.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/web/www.******.it/www/zp-core/admin-options.php:226) in /home/web/www.antonioranesi.it/www/zp-core/admin-options.php on line 417 ` but after a refresh in browser everything goes ok (?)
I tryed to run the list_locales.php script but I received the following warning: `Warning: system() has been disabled for security reasons in /home/web/www.*******.it/www/list_locales.php on line 4`
Anyway everything works fine for the languages with their own .po files and, of course, english still works after the error message. I suppose that a workaround could be to disable these warnings, at least in the front end, to allow visitors to change language. Am I true? If so what is the best way to disable warnings?
It would seem you are not using a current version of Zenphoto since the above line has no reference to the variable `locale` nor does any line nearby. Perhaps you should upgrade.
But anyway, without the locale functionality on your server other language based things will not work such as PHP based strings like dates. So, the best solution is to work with your provider to get their configuration straightened out.
Thanks for your fast reply sbillard. I'm actually using the latest version of zenphoto and zenpage with a fresh install, my first one. In the admin-optinos.php at line 226 I have this code: `$result = setlocale(LC_ALL, $locale.'.'.$encoding, $locale);` btw all the locales with te .po flies work flawless, I have only problems with en_us
Great, latest nightly buld solved the problem in the admin-options!
On the other side now I can't set the front-end in english via the dynamic-locale plug-in. It works for fr, it and ge but not for english. After the usual warning it switches to the browser language, unless I set english instead of HTTP Accept Language in the back end.
I'll manage it somehow, anyway thanks for your great work on this project!
I'll ask my provider. I'm quite new to this world so I don't understand if it's possible that locale is not enabled while I get warnings only with en_us and not with other languages. Even during installation process, done in italian, I don't get any warning about this. The only warning I get is: `Setting mbstring.internal_encoding to UTF-8 in your php.ini file is recommended to insure accented and multi-byte characters function properly.`
When I tested zenphoto locally on my own PC I was unable to get locale working on windows, so I tryed with Ubuntu and everything went fine. In windows locale didn't work also with other languages, as one can expect..
Hi again, I found a workaround, too simple and too dirty to trust it but i'll explain it here. Before going on let me say that I asked my provider (shellrent.com, or their office in Italy) about the support of en_US but their answer was really evasive: "the locale is on, at least you can use it in Italian" While I was waiting for a new answer to a more specific question about the same problem, I made this simple experiment: 1) I deleted the locale folder de_DE. I don't need it atm and German locale was working on my server. 2) I renamed the folder en_US to de_De 3) In functions-i18n.php I replaced the string: `'de_DE' => gettext('German (Germany)'),` With: `'de_DE' => gettext('English (United States)'),`
I know it's crazy but everyting works as needed now. Feel free to remove this post if it can lead to improper use of your CMS by other people. This is non compatible with whatever upgrade of course.
ciao bic
edit: Of course the AcceptLanguage doesn't work in this way
After a few tests I discovered that also AcceptLanguage partially works. If you have de_DE as preferred language in your browser the gallery will be displayed in english. The second choiche in your browser will be ingored in this case. But if you have en_US as first choiche your browser will display the second choiche, if any.
Comments
http://www.zenphoto.org/2008/08/troubleshooting-zenphoto/#24
Under 5. you can download a script to see what locales your server supports.
in 1.1.7,it will be freely changed to all language without that error.
Key code coef morecode fullcode
1.0-zh zh 1.0 cn zh_cn
Supported locales:
it seems only sopport zh_cn,it depends on computer language?can not be switched freely?
"Locale functionality is not implemented on your platform or the specified locale does not exist. Language translation may not work."
And I cannot set up the language.
I am working with the most current nightly build.
The fix is to configure the server correctly. However, you can also ignore the error message.
`Locale functionality is not implemented on your platform or the specified locale does not exist. Language translation may not work.`
Furthemore I have a warning when I try to change the language (from/to whatever) in amin>options>gallery configuration:
`
Notice: Undefined variable: locale in /home/web/www.*****.it/www/zp-core/admin-options.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/web/www.******.it/www/zp-core/admin-options.php:226) in /home/web/www.antonioranesi.it/www/zp-core/admin-options.php on line 417
`
but after a refresh in browser everything goes ok (?)
I tryed to run the list_locales.php script but I received the following warning:
`Warning: system() has been disabled for security reasons in /home/web/www.*******.it/www/list_locales.php on line 4`
Anyway everything works fine for the languages with their own .po files and, of course, english still works after the error message.
I suppose that a workaround could be to disable these warnings, at least in the front end, to allow visitors to change language.
Am I true? If so what is the best way to disable warnings?
Ciao
bic
But anyway, without the locale functionality on your server other language based things will not work such as PHP based strings like dates. So, the best solution is to work with your provider to get their configuration straightened out.
I'm actually using the latest version of zenphoto and zenpage with a fresh install, my first one.
In the admin-optinos.php at line 226 I have this code:
`$result = setlocale(LC_ALL, $locale.'.'.$encoding, $locale);`
btw all the locales with te .po flies work flawless, I have only problems with en_us
On the other side now I can't set the front-end in english via the dynamic-locale plug-in. It works for fr, it and ge but not for english. After the usual warning it switches to the browser language, unless I set english instead of HTTP Accept Language in the back end.
I'll manage it somehow, anyway thanks for your great work on this project!
Even during installation process, done in italian, I don't get any warning about this.
The only warning I get is:
`Setting mbstring.internal_encoding to UTF-8 in your php.ini file is recommended to insure accented and multi-byte characters function properly.`
When I tested zenphoto locally on my own PC I was unable to get locale working on windows, so I tryed with Ubuntu and everything went fine. In windows locale didn't work also with other languages, as one can expect..
Before going on let me say that I asked my provider (shellrent.com, or their office in Italy) about the support of en_US but their answer was really evasive: "the locale is on, at least you can use it in Italian"
While I was waiting for a new answer to a more specific question about the same problem, I made this simple experiment:
1) I deleted the locale folder de_DE. I don't need it atm and German locale was working on my server.
2) I renamed the folder en_US to de_De
3) In functions-i18n.php I replaced the string:
`'de_DE' => gettext('German (Germany)'),`
With:
`'de_DE' => gettext('English (United States)'),`
I know it's crazy but everyting works as needed now.
Feel free to remove this post if it can lead to improper use of your CMS by other people. This is non compatible with whatever upgrade of course.
ciao
bic
edit:
Of course the AcceptLanguage doesn't work in this way
But if you have en_US as first choiche your browser will display the second choiche, if any.