Page 1 of 1

Losing of lang-strings

Posted: Fri Apr 15, 2011 10:12 pm
by LazyBadger
Serendipity 1.5.5, base core code. I saw in sources of lang.inc.php

Code: Select all

    if (@include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_'. $serendipity['lang'] .'.inc.php') ) {
        // Only here can we truely say the language is loaded
        define('serendipity_LANG_LOADED', true);
        if (function_exists('serendipity_db_reconnect')) {
            serendipity_db_reconnect();
        }
...
    // Do fallback to english
    if (IS_installed === false || (defined('IS_up2date') && IS_up2date === false)) {
        @include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_en.inc.php');
but, if localisation-file and serendipity_lang_en.inc.php are out of sync in terms of keys, we have undefined strings in interface.
From my POV, serendipity_lang_en.inc.php must be included first, before localisation (which overload duplicated strings but show missing in pure English instead of f.e INSTALL_OFFSET_ON_SERVER_TIME
INSTALL_OFFSET_ON_SERVER_TIME_DESC)

Re: Losing of lang-strings

Posted: Fri Apr 15, 2011 11:55 pm
by kleinerChemiker
iirc the language strings are saved as constants. If you try to define a constant a second time, you will get an error.