English (US) is not available. The locale en_US is not supported on your server.

English (US) is not available. The locale en_US is not supported on your server.

what's wrong?

Comments

  • acrylian Administrator, Developer
    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.
  • infactly,it can be changed to english or other languages,but it will also accord to this error,except my computer language. is that correctly?

    in 1.1.7,it will be freely changed to all language without that error.
  • acrylian Administrator, Developer
    Do you have the en_US folder (it is okay that it is empty) within the zp-core/locale folder?
  • yes,have all defalut language folders
  • 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).
  • Http Accept Languages:
    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?
  • 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.
  • acrylian Administrator, Developer
    I would suggest to contact your ISP about that.
  • I just test on localhost.it has no error in Ver1.1.7
  • 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.
  • It seems depends on computer language ,when change to other language ,it will cause error,but it had be changed,just display that error.
  • Well, it is an error to change to a language which is not supported on the server.
  • when do you fix it?
  • I am seeing this error too. Do I need to configure something?

    "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.
  • See #3 http://www.zenphoto.org/2008/08/troubleshooting-zenphoto/#24

    The fix is to configure the server correctly. However, you can also ignore the error message.
  • I am testing on windows,how to configure it.
  • everything I know about configuring is shown in the link above.
  • bic Member, Translator
    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?

    Ciao
    bic
  • 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.
  • bic Member, Translator
    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
  • Install the nightly build.
  • bic Member, Translator
    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!
  • No guarentees if the locale functionality is not implemented on your server. You need to get that fixed.
  • bic Member, Translator
    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..
  • A least some Windows OS support locale functionality: http://www.science.co.il/Language/Locale-Codes.asp
  • bic Member, Translator
    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
  • bic Member, Translator
    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.
  • I suppose you could make an 'English US' translation....
  • bic Member, Translator
    LOL, after I finish the 'English - Spaghetti" one
  • bic Member, Translator
    Bingo! Finally my provider enabled en_US. Thanks again sbillard for you help, before talking with you I had no idea what arguments to use with them :)
Sign In or Register to comment.