How to change language

How do I change the admin panels language to UK (or even US) English? I can't make it happen.

This is how it's been set at the moment:
https://pbs.twimg.com/media/CKsEpxkVEAAX5EP.png:large

So for searchers: ONLY english is ticked, the rest is unticked. I'd expect zenphoto to NEVER EVER pick a language that is disallowed to be picked by having it unticked in this list. Apparently zenphoto magically sets my admin panels language to Dutch.

Okay, my computer's locale is set to Dutch, but its *language* is English.

Even if I physically delete in /zp-core/locale every language but en_US, it still manages to display everything translated into Dutch.

So, here's the tl;dr:

1) How does zenphoto determine which language to display?
2) How can it still display a language which has been physically deleted?
3) Ultimately, how do I tell zenphoto to use the language that is ticked in the admin panel options?

Also, a small hint to the zenphoto devs: locale != language.

Comments

  • thany Member
    Well, unless I delete the language files and restart the server. Sure, why not.

    But this will go wrong in an update, which will happily reinstall those files. So we still need this to be solved proper.
  • acrylian Administrator
    1) By general selection (either main options or the individual user lang option) and what your server has installed. If you enable Italian and your server does not have the Italian locale you won't be able to see and use it.

    So does your server has the English respectively en_US locale? Although that should not matter as English is the default language.

    2) Don't ask me about server internals but we use gettext for the (static) languages and locale stuff. That is likely cached on the server so maybe that is too persistent. Also be sure browser caches don't play tricks on your.

    3) Surely related to 2). I can say this is not normal behaviour and I personally have not seen that on various hosts. Did you contact your host about?
  • thany Member
    1) like I said, locale != language.
    I should be able to use Dutch locale on an English language, or UK locale on the French language. In technical terms, many languages may belong to a single locale (two spoken languages in the Belgian locale), while many locales may exist for a single language (English spoken in many different countries).

    So whatever the server has, might be picked up as the LOCALE. As for the LANGUAGE, it should pick whatever the user has selected - independent of the locale.

    2) Browser cache was disabled. It was probably some sort of memory cache on the server. But that doesn't happen magically, i.e. "someone" built it that way. So I do ask you about it, so to speak ;)

    3) No host. I'm running it on locally on Windows 7 / Apache 2.4 / PHP 5. All possible locales can be selected if need be, I don't think it's possible to even uninstall locales. Anyhow, the language is English, which is what should matter. As for the locale - I could give a monkey's toss how the admin panels render a number or a date.
  • fretzl Administrator
    I've had similar problems locally only (OS X MAMP)
    Didn't bother because it worked properly on shared hosts.
    Recent changes suddenly made it work fine for me.

    If you are still using 1.4.7 (which I believe you do) then I recommend to update.
  • acrylian Administrator
    1) like I said, locale != language.

    Yes, in reality ;-) The gettext extension requires the locale to be able to process a translation.

    Do you use WAMP on Windows? These predefined *AMP packages generally behave like a live server.
  • thany Member
    I'm using XAMPP - but should it matter?
    Whatever happens on one server, may happen on another server just as well, as far as I'm concerned.

    I don't know about the gettext extension, but the fact is that *something* chooses the language file, and does so without respecting my choice.
  • acrylian Administrator
    Again, the only way it would automatically select something is if http accept language is enabled. Then it will choose the language the browser submits.

    Otherwise either the manual selection or the selection in the user account which will overrride it. Both are stored in the database.

    Sorry to say it is working here as expected on MAMP (all locales), my live shared hosting (whcih on has German and English) and the zenphoto.org server (all locales) as on other shared hosts I have installed Zenphoto over the years.
  • thany Member
    "it works on my machine"
    Well it doesn't on mine. Sorry to say.

    Look, it's fairly simple: I select English as the display language, so zenphoto selects and displays the English language. It really isn't more complicated than that.

    Whatever other magic is happening, doesn't work and is breaking it.
  • acrylian Administrator
    Well it doesn't on mine. Sorry to say.
    Yes, but it is as you say only you so far. As on your other issue: If I cannot reproduce it so far I cannot work on anything. I did explain how the translation stuff works, it will not change no matter how you insist. Again this will not satisfy you. Sorry.

    Again you select en_US not English in general, that's not how it works as en_UK would be a complete separate translation file (if one exists).

    So go to `zp-core/locale/` and remove all translation folders except the en_US one. If you then still don't get English text, something is really weird on your server.
  • fretzl Administrator
    Just learned something. Although mentioned by @acrylian several times on the forum it never sank in.
    Maybe it helps.

    On the "Users" tab (user settings) you can specify a language by clicking a flag.
    This setting overrides any selection you have in Options > General > Languages.

    By simply un-selecting the flag in the user settings you have full control again over the "general" settings.
Sign In or Register to comment.