Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#285 closed bug (fixed)

language changes arbitrarily within the page

Reported by: lemon-head Owned by:
Priority: major Milestone: 0.1.2.1
Component: BW General Keywords: lang.php, words.lib.php, language
Cc:

Description

On test.bewelcome.org/main we had the problem that part of the page was in english, and another part in finnish (when choosing finnish as the language).

The reason is that the old "lang.php",included from "old_bw_func.lib.php", does its own modifications on the $_SESSIONlang? variable, evtl switching it back to english.

As a temporary solution, we change the responsible part of the "old_bw_func.lib.php" to

require_once($dir."FunctionsTools.php");
require_once($dir."session.php");
require_once($dir."bwdb.php");
//require_once($dir."lang.php");
require_once "../modules/i18n/lib/words.lib.php";

function ww($code, $arg1="", $arg2="", $arg3="")
{
    $bw_words = new MOD_words();
    return $bw_words->getBuffered($code, $arg1, $arg2, $arg3);
}
require_once("../htdocs/bw/layout/layouttools.php");


Which means, we replace the old ww function with something new, which calls a member function of MOD_words.

Change History (3)

comment:1 Changed 9 years ago by lemon-head

  • Resolution set to fixed
  • Status changed from new to closed

Solved by removing all bw includes from rox, and revamping the language switcher in rox.ctrl.php.

comment:2 Changed 9 years ago by lemon-head

(forgot to mention it was in [3689] and [3690]. See also #292)

comment:3 Changed 9 years ago by lemon-head

  • Milestone set to 0.1.2.1 release with MOD_words + MOD_layoutbits
Note: See TracTickets for help on using tickets.