Translation incomplete

news4kmw's Avatar


22 Jan, 2016 06:33 PM

Hi Ryan, hi All,

although following the hints in
1. "Changing the default language" and inserting "de_DE" into the return statement of "function getLanguage ()"
2. adjusting the "language" varchar to 'de_DE' in TABLE `fcms_user_settings`
the translation will not work properly (see attached file).

In the menu the "Home" is translated into German "Startseite"
and the days in the calendar are translated too. But not anything else.
After checking here and there I've no clue, where this devil might hide.

Any idea(s) cordially welcome and thanks in advance!

Karl M.

  1. Support Staff 1 Posted by Ryan Haudenschi... on 23 Jan, 2016 02:31 PM

    Ryan Haudenschilt's Avatar

    Sure, the translations for German are stored in language/de_DE/LC_MESSAGES/. There should be 2 files in there a human readable version (PO) and a machine readable (MO) version.

    You may also want to check out the translation site for a more up to date PO file ( Looks like currently German is only 87% complete.

  2. 2 Posted by news4kmw on 23 Jan, 2016 05:21 PM

    news4kmw's Avatar

    Ryan, thank you so far!

    Well, I finished translation under the above link, downloaded the .po file, renamed it to messages.po, compiled it under poedit, so getting a file. Updated my /language/de_DE/LC_MESSAGES/ directory with these two new files ...
    and the result is the same as before. Screenshot attached.

    Second examination: If I'll choose e.g. French as my language, the system shows the same behaviour. Only those few translations are shown, rest stays in original language (en).

    What do you think? Problem with:
    1. the .po .mo files
    2. my server account (cause other people will go ok)
    3. ???

    Well I saw in the discussion under:
    Sylvain seems to have the same behaviour. Some words are translated, others not.

    Any more ideas, I'd be very pleased!

    Thanks in advance and greets
    Karl M.

  3. 3 Posted by news4kmw on 28 Jan, 2016 04:25 PM

    news4kmw's Avatar

    ReHi Ryan,

    ... okay, sometimes one has to go the hard way.
    In /fcms.php just added one statement did the trick for me:

    --- code ---
    function setLanguage ()
        if (isset($_SESSION['language']))
            T_setlocale(LC_MESSAGES, $_SESSION['language']);
            $lang = getLanguage();
            T_setlocale(LC_MESSAGES, $lang);
        T_bindtextdomain('messages', './language');
        T_bind_textdomain_codeset('messages', 'UTF-8');
    // kmw ins
    // /ins
    --- code end ---

    Now FCMS works like a charm, of course only in German, but that is ok for me and my family. ;-) One more time to say: "Thank you Ryan for this shiny piece of software!"

    Perhaps interesting for someone:

    1. My FCMS lies on a Strato WebServer with PHP Version 5.5.31 and MySQL 5.5.45.

    2. Some others seem to have just the identical translation problem like mine, see e.g. threads:

    3. A test installation on my raspberry server with Debian 7.8 (wheezy), PHP Version 5.4.45-0+deb7u2 and MySQL 5.5.46 worked out of the box without the "putenv" trick.

    Thanks again for your support!
    Karl M.

  4. Support Staff 4 Posted by Ryan Haudenschi... on 30 Jan, 2016 06:53 PM

    Ryan Haudenschilt's Avatar

    Sorry for the slow response.

    When you talk about 'choosing French as you language' where exactly are you doing this?

    Do you mean, when you login? Or are you actually changing your settings under My Stuff > Settings?

  5. 5 Posted by news4kmw on 30 Jan, 2016 10:00 PM

    news4kmw's Avatar

    Ryan, I'm pleased hearing from you!

    Please let's differentiate, as I told in my last post.

    1. On my raspi http-server I've got no worries. Everything according to translation works absolutely fine. One can choose from the given languages in the login box and at once "gettext" changes the phrases into the expected one. Just perfect!

    2. On my webspace at Strato (a German hosting company) you can choose whatever you want at login , nothing happens, the default language (en) remains.
    But changing settings under "My Stuff - Settings", you'll get a situation as described in my first post: "Home [The beginning or starting place]" is translated and so are the "[one letter abbreviations]" for the weekdays. And that's it, no more phrases are translated, exactly the same situation as described in the given threads I posted above.

    Hope, I figured out, what you expected.

    Thanks a lot!
    Karl M.

  6. 6 Posted by Markus I. on 08 Feb, 2016 01:39 PM

    Markus I.'s Avatar

    I have the same issue: home.php, profile.php and notifications.php will not be translated. I have tested this with german, french and italy.

    the proposed solution in #3 doesn't work for me ( putenv('LC_ALL=de_DE.utf8');

    Server: Linux www118 3.10.7-gentoo-r1 #1 SMP Thu Oct 3 14:17:05 CEST 2013 i686
    PHP: 5.6.10-pl0-gentoo
    MYSQL: 5.6.26

  7. Support Staff 7 Posted by Ryan Haudenschi... on 09 Feb, 2016 12:32 PM

    Ryan Haudenschilt's Avatar

    This does indeed look to be a problem. I just can't figure out what the problem is.

    Markus -- home, profile and notifications are the only pages that are missing translations?

  8. 8 Posted by Markus I on 09 Feb, 2016 03:07 PM

    Markus I's Avatar

    Yes, this three pages are the only pages without translation. I checked the source and didn't find any obvious error.

  9. 9 Posted by news4kmw on 09 Feb, 2016 06:59 PM

    news4kmw's Avatar

    In my environment (Strato-Server) none of the pages is translated. Only the menu item "Home" and the "[one letter abbreviations]" for the weekdays. That's all.

  10. Support Staff 10 Posted by Ryan Haudenschi... on 19 Feb, 2016 01:48 PM

    Ryan Haudenschilt's Avatar

    I've created a new github issue for this.

  11. 11 Posted by Markus I. on 22 Feb, 2016 10:34 AM

    Markus I.'s Avatar

    I made some tests and found, that the language is not set in ui/themes/default/templates/global/header.php. so i have put as dirty solution this code on the top of header.php

    setLanguage ();

    this solution solve many problems but not all. The links in the navebar of my stuff is still in english.

  12. 12 Posted by Markus I. on 24 Feb, 2016 02:35 PM

    Markus I.'s Avatar

    now, my translation works perfect!

    I added in
    the following code in the function getNavLinks:

    function getNavLinks ()
    // missing translation in navigation
    setLanguage ();
    // missing translation in navigation

  13. Support Staff 13 Posted by Ryan Haudenschi... on 24 Feb, 2016 02:40 PM

    Ryan Haudenschilt's Avatar

    I cannot understand how this works. It doesn't make any sense. setLanguage() is already called before we do anything on any page. It's like the 2nd thing that is done.

    Anyway, thanks for looking into this Markus. Appreciate the help

  14. 14 Posted by Markus Imhof on 24 Feb, 2016 04:25 PM

    Markus Imhof's Avatar

    I don’t uderstand this too.

    But I checked the html output oft he script and added some tests, so I realized, that the language variable is unknown in the startpage. For example in the header oft the html page i saw:

    "<html xmlns="" xml:lang="lang" lang="lang"> "

    so i called the function "setLanguage" in the file "header.php", after this, the startpage is translated correct.

    Then i tested the function getNavLinks, and there too, the language variable is unknown on my server, so i called the function "setlanguage" again and now all works perfect for me.

    I know, this is a quick and dirty solution, but i works for me like a charm.

    Von: Ryan Haudenschilt [mailto:[email blocked]]
    Gesendet: Mittwoch, 24. Februar 2016 15:40
    An: [email blocked]
    Betreff: Re: Translation incomplete [Problems, Issues and Bugs #4780]

  15. Support Staff 15 Posted by Ryan Haudenschi... on 14 Nov, 2016 06:11 PM

    Ryan Haudenschilt's Avatar

    I think I have fixed this problem, but I still can't reproduce it, so I need you guys to help verify my fix actually fixes the issues.

    Can you please download and replace the folling fcms.php file with yours and see if that fixes these translation issues.

  16. 16 Posted by news4kmw on 15 Nov, 2016 05:57 PM

    news4kmw's Avatar

    Yes you killed the beast!
    Works perfect on my server environment.
    Thanks a lot!

  17. Support Staff 17 Posted by Ryan Haudenschi... on 15 Nov, 2016 06:41 PM

    Ryan Haudenschilt's Avatar

    Awesome, thanks for your help

  18. Ryan Haudenschilt closed this discussion on 15 Nov, 2016 06:59 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac