Language setting for bridges in general Language setting for bridges in general
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Language setting for bridges in general

Started by wvdmark, May 31, 2011, 11:43:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wvdmark

I have been making a bridge for a home grown application which manages approx 3000 users of the retirees of the defunct airline swissair (not swiss).
In order to set the language (which is stored in a cookie) I had to make a small enhancement for the cpg_udb class:

in init.inc (after user_get_profile):
// Get language from bridge *wvdmark*
$USER['lang']=$cpg_udb->cookie_language();

in coppermine.inc (somewhere under overridden function):
         function cookie_language()
         {
            global $USER;
            return $USER['lang'];
         }
in my bridge: attached: function cookie_language() that analyses my language cookie. Seems to work, found no other solution.