Language incorrect

I cannot get the language on English for the life of me!

My Windows 10 is English, display language is English UK, location is set to UK, my locale (for number, dates, and times ONLY!) is set to Dutch, my browser language is English, its requested languages are English UK and English US.

Zenphoto absolutely refuses to display itself in any language other than Dutch.

Dutch is my *locale*. NOT my language.

Learn this very well: language and locale are two different, independent things.

So in zenphoto's language option, English US is selected (the ball is black) and ticked (greyed out even, for whatever reason I don't care about). Nederlands (which is Dutch) is NOT selected, and NOT ticked. Dutch should not even be enabled, let alone active!

I've also tried to set it to HTPP Accept Language. Like I said, my browser sends English ONLY, and yet zenphoto manages to find a Dutch tag in there. Abacadabra...

So why is Dutch magically being applied?? How do I tell zenphoto to *just* use the language I tell it to use??


  • Current workaround: remove zp-core/locale/nl-NL (or rename it).

    Who's brilliant idea was it to call them locales actually? They are NOT locales. They are languages. Literally only languages. There's nothing locale-related in there.
  • acrylian Administrator, Developer
    Locale is what they are called in PHP and they do refer to more internal settings in PHP besides just the translation file Like date formatting, commas instead of dot on decimal values, month/day names generated by PHP etc. This locale needs to be installed on your server.

    SInce it is PHP functionality you NEED to have the locale installed on your server to use a "language"/locale. Since the default of Zenphoto is en_US you need that locale. A workaround for your issue could be to create an empty en_UK folder or install the locale on the server.

    Sorry, to say but I never encountered this issue on any server I ever used Zenphoto. That does not mean you don't have the issue but it might be a Windows things. We don't test Windows / ISS servers.

    Did you try to disable all languages except English (there is no translation file since that is the native language)? Also check if your browser accidentally requests any language (Firefox has a setting for that for example).
  • This is a close-enough-to-default XAMPP installation. So yes, Windows indeed, but still Apache.

    Having read your reply, you still don't seem to understand that locales are NOT languages. Locales is, as you mention, date/number/etc formatting, but nothing more!

    Locale should be separate from language.

    And yes, I have unticked ALL languages except English. And I already said my browser doesn't request Dutch. Just English. I also *unticked* the HTTP Accept language option, so that last bit shouldn't even matter.

    But all aside, the most important bit:
    If I tell zenphoto to use English, I want it in English. Period.

    It shouldn't do any magic nor try to be intelligent. JUST use what the user sets and be done with it. Couldn't be simpler.

    Now, what if I want Japanese locale with English language?... That, my friends, is why locale and language are two totally different and separate things.
  • acrylian Administrator, Developer
    Sorry, locale and language is not separate in PHP and gettext. The locale setting does set which language file to use for the static strings on the backend.
  • Fine, but that still doesn't solve the problem:

    If I set zenphoto to en-US (or whatever locale), it needs to respect that setting and use that locale. Not any other locale. Just the one locale I tell it to use. No magic.
  • acrylian Administrator, Developer
    Well, as said if your server does not have the locale it will not work.
Sign In or Register to comment.