User guide

Problems with languages

    How to install languages (translations)

    A translation has this folder and naming structure:

    de_DE/
    de_DE/LC_MESSAGES
    de_DE/LC_MESSAGES/zenphoto.po
    de_DE/LC_MESSAGES/zenphoto.mo
    

    This is an example for the German translation (de_DE locale). Just place the translation folder – in this case de_DE – within /zp-core/locale/ and you can select the translation on the Options > General > Languages on the Zenphoto backend.

    Difficulties with zenphoto language translations

    There are several problems you might be having with language translations:

    There is no language selection for my desired language

    Zenphoto relies on volunteers to translate each release. We have a large number of dedicated individuals making translations. There may be a translation for your language which was not avaiable in time for the zenphoto release. You can check by reviewing on GItHub the current master branch or the development branch for the next release. If you language does not exist there, consider volunteering to produce it. For details see our translation tutorial.

    There are phrases which are displayed in English even though I have selected a different language

    Zenphoto is an ever evolving software. We will occasionally include a translation that is not 100% complete feeling that something is better than nothing. Check the curent Zenphoto master branch to see if there is an update for your language. If that does not help, open a new issue on GitHub specifying what version of zenphoto your are running and phrases which are displaying in English. (It will also help if you indicate where you see them, eg. the Stopdesign image page, the admin theme tab.)

    When I select my language I get an error saying that the locale is not supported on my server

    Language support requires two capabilities in addition to #1 above. First, the server running your site must have support installed for the locale associated with your language. (See #4 for the second capability.) If you are getting an error when selecting a language saying that it is not supported on the server you will have to contact your provider to get the server updated with the necessary language support. You can get a list of locales your server supports by running the list_locales script. For further information on locales see Controlling your locale with environment variables and Locales mini-HOWTO.You can also look at the output of the list_locales script to see if there is an alternative language that fits your needs. For instance, if Zenphoto supplies a Spanish (Latin America) tranlsation but your server does not support it. Maybe your server supports Spanish (Bolivia). You could rename the es_LA folder to es_BO and get the translations.

    Even though support for my language exists, I am getting only English text

    Zenphoto uses a PHP feature named gettext() to support translations. If you are getting a notice from setup.php that PHP gettext() support is not installed all text will be displayed in English no matter which language you have selected. We hope in the future to have a replacement library to provide translations for installations with no gettext() support. Until then you will have to arrange with your ISP for gettext to be installed.

    I have selected HTTP Accept Language on the admin gallery configuration tab but I am not seeing text in my language

    Your browser must specify your preferred language. To see what is being reported as your preferred languages run the list_locales script. (Also see #3 and #4 above.

    In my database there are fields that contain weird string like a:1:{s:5:"fr_FR";s:9:"Guatemala";}

    This is a serialized string of an array containing the translation for each language version used if in multilingual mode. In this case it is only a French version.

    You may think why is it that way if you just use one language: On older Zenphoto versions the string was stored as plain text if in single language mode and only as a serialized array in multilingual mode. The drawback of that was that you would have lost all your translations if you used the multilingual mode, switched to the single language mode and re-saved your item. To prevent that all fields that support multilingual usage (title, description, content etc.) are stored as serialized strings always.

    TinyMCE is not translated

    TinyMCE is a third party solution that uses its own translation files and technique. There are already some languages preinstalled. These are bascially those that are currently completed or partly available for Zenphoto itself. But you might want to check its own project site for more or also updated translations.

    Creative Commons LicenseThis text by www.zenphoto.org is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

    For questions and comments please use the forum or discuss on the social networks.

    Related items