How to switch all the Zenphoto interface in another language?

Hello,

How is it possible to get the administrator interface in another language (in my case, in French)? I have disabled all the languages I don't use. I have activated the multi-lingual box, I have activated the "Dynamic-Locale" plugin. On the login page, it is possible to see that the language used by the interface is French (the translated strings are displayed). However, when a registered user tries to upload a photo, an English interface is displayed. However, the French language file (fr_FR) seems to contain all the strings of the interface in full... Hence my question: how to get a whole interface in another language?

Thanks a lot for your help!

André

Translated with www.DeepL.com/Translator (free version)

Comments

  • acrylian Administrator, Developer

    Yes, you can set the general admin language on the Options > General and additionally each user account can have its own preferred language.

  • Hello,

    Thank you for your answer in such a short time. Before contacting this forum, I had already checked the radio button and the checkbox on the only language to use, French (all other languages are disabled) in Options > General > Language: ...

    Even if the translation is incomplete {1.5.8} for v1.6, it should be displayed it seems to me...

    Do you have another solution proposal?

    Thank you!

    Translated with www.DeepL.com/Translator (free version)

  • acrylian Administrator, Developer
    edited January 2023

    If you generally don't see any French although you enabled it that generally means that your server either does not have the PHP gettext extension (setup should have mentioned that) or your server does not have the French locale installed. For both you would have to contact your host.

  • Hello,

    Thank you again for such a quick response! I am the administrator of the site. I can confirm that the PHP extension gettext is indeed activated. Moreover, I can confirm that the French translation files are in \zp-core\locale\fr_FR\LC_MESSAGES\zenphoto.po.

    If you have other solutions in mind, please let me know - I've been trying to fix this for a while now.

    Thank you.

  • acrylian Administrator, Developer
    edited January 2023

    \zp-core\locale\fr_FR\LC_MESSAGES\zenphoto.po.

    Those are the translation files. I was referring to the server locale. You have to check if the server has the French locale, too. If not the translations will not work. There is a tool on the admin overview page called "Locale info" that would dispaly all locales the server has.

    Also check if you have the Http Accept Language optin enabled as then the browser may send a different language request and override the selection.

  • sbillard Member
    edited January 2023

    Server locale can be a daunting problem. For instance I know of no Windows based php servers that will work with native gettext. What I have found that works is to disable the PHP gettext extension and load instead PHP Gettext https://github.com/php-gettext/Gettext .

    My hosting service also has a spotty history of including Gettext in its PHP builds. So my software includes the PHP Gettext source and adds code at the end of functions-basic.php:

    if (!function_exists("gettext")) { require_once(__DIR__ . '/php-gettext/gettext.inc'); }

  • acrylian Administrator, Developer

    I personally don't know any standard webhost over here at least that is Windows based (except running localhost WAMP or similar). All are Linux/Unix and I never encountered issues with gettext, not being available.

    They even mostly have plently locales pre-installed and for sure the local German one which of course makes sense in my case.

    If gettext is really missing contact the host if they can install it and also the required locale(s). If they really charge extra for that, perhaps consider moving somewhere else…

  • Hello,

    Some background information: WAMPP 3.3.0 64-bit on Windows 10, which involves Apache 2.4.54.2, PHP 7.4.33, MySQL 8.0.31, Firefox 109.0.

    After checking on the server, it appears that HTTP_ACCEPT_LANGUAGE fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3.

    Moreover, as mentioned, it seems that Zenphoto's translation feature is partially working since on the login page, all the strings translated into French in the appropriate fields are available when activating in Options > General > the "Multi-Langual" checkbox. The only remaining problem is when an authenticated user tries to upload a photo, then the interface text appears in English (even if English is not a selected language, let alone a default language).

    Is the English language (default) hard-coded or could it be overwritten by overwriting the file with another language file?

    Thank you to all those who are working to find a solution to this problem.

  • acrylian Administrator, Developer
    edited January 2023

    s the English language (default) hard-coded or could it be overwritten by overwriting the file with another language file?

    Wrong question. English is the default language and therefore "hardcoded" using the PHP gettext functionality. That functionality does the "overwriting" i via the translation files (please see e.g. php.net on how gettext works).

    Please post exactly what string are not translated and which of the two uploaders you are using. One uploader uses a third party script so it might be that this is not fully translated or translatable.

    Btw, you don't need to enable the multilingual option if you are only using one language like French.

  • acrylian Administrator, Developer

    I just tried on our site with German and both upload pages as you see here are fully translated (the screenshot is a bit older the part below of the jquery uploader may look a little different since its 3rd party update):
    https://www.zenphoto.org/screenshots/zenphoto-admin/upload-image-jquery-multifile.jpg.html
    https://www.zenphoto.org/screenshots/zenphoto-admin/upload-image-http.jpg.html

    Since French has got no update for a while sadly it may lack these parts as there have been some changes.

  • Thank you again for helping to resolve this situation.

    Here is the language configuration:
    https://drive.google.com/file/d/1uGJYpWwQLb6JP4-BwtjHWXa9mJvivjrd/view?usp=share_link

    Here is the login page:
    https://drive.google.com/file/d/1KGpihdd5BZAK6c3cJmERxgEIvAxVXevR/view?usp=share_link
    We notice that two different languages are displayed

    Here is the upload page:
    https://drive.google.com/file/d/1E6mJSMQRhI5hJyoRtOTsVmFPb10EGZPU/view?usp=share_link
    We notice that the page is only in English.

    I hope that these images will explain better than my words the situation in progress.

    Thank you for your help!

    Translated with www.DeepL.com/Translator (free version)

  • acrylian Administrator, Developer
    edited January 2023

    Did you really check the langauge setting on the related user account? If that is still set to English it will override the language on all backend related pages incl. the toolbox. See the flags here: https://www.zenphoto.org/screenshots/zenphoto-admin/user-profile.jpg.html

    The front end language selector is primarily for, well, the front end.

  • laflama Member
    edited January 2023

    Hello,

    The user language is set to French. No other language is available on the server as shown here:
    https://drive.google.com/file/d/1uGJYpWwQLb6JP4-BwtjHWXa9mJvivjrd/view

    I don't know what is the wrong setting in this installation.

    Thank you for your help.

  • acrylian Administrator, Developer

    Please view thte user account and try re-saving it with French. In any case that is saved and does not update itself, perhaps it somehow still uses a language not enabled…

    Also try force clearing your browser cache as that can play all sorts of tricks with the nowadays overly persistent caching.

  • Hello,

    I did exactly what you asked. However, the problem still persists.

    I am out of options.

    Thanks.

  • acrylian Administrator, Developer

    I checked again. I can reproduce that the admin toolbox is not translated (any language) as set on the backend and/or user account. It is fully gettexted for translations. It is probably although it technically belongs to the backend it is front end.

    I have no solution for this right now. But I don't think that those links are really that much of a problem since the backend where you actually work/upload is translated (at least for me)

  • ctdlg Member
    edited January 2023

    Hello laflama,

    I am French too, and I am using Zenphoto 1.6.

    My admin pages are in French if my user pages are in French ( flag at the bottom of my user pages).

    My admin pages are in English if my user pages are in English ( flag at the bottom of my user pages).

    You need to enable the English American language (admin language configuration) to be able to switch from French to English or English to French from user (not admin) pages !

  • Hello,

    @Acrylian: I'm glad you were able to reproduce the situation on your installation.

    @ctdlg: Thanks for this new solution hypothesis. Unfortunately, after trying, I still have the same problem. What is the context of your installation (XAMP, WAMP or other?).

    Thanks to you.

  • ctdlg Member
    edited January 2023

    @laflama

    It does work under Xampp (my test machine), but my online website is hosted by O2Switch. It does work online too.

    Simple question : do you use php 8.1 ? This is what I'm using !
    En Français

    Français

    Français

    Français

    In English

    Anglais

Sign In or Register to comment.