[Chameleon] MLT CVS problems

Bart van den Eijnden bartvde at xs4all.nl
Wed Mar 8 08:18:32 EST 2006


Hi list,

Question in advance, what is the correct way to load a different language?
I have done the following:
a) set nl-NL in chameleon.xml
b) $_SESSION['aszLang'] = array( "NL_NL" );

If I do not set b) I get the encoding problem as specified in MT bug 1329.

I have run into a few problems with the latest MLT CVS code:

1) it seems to me txt resources are only loaded from the chameleon widgets
dir, and not for other widget directories specified.

The code in WidgetManager.php does only the following so this goes wrong
for widgets not present in the chameleon widget dir:

               $this->moMLT->loadResource( $oWidget->mszWidgetName,
                                            str_replace("\\","/",
                                            dirname(__FILE__) ).'/widgets/'.
                                            $oWidget->mszWidgetName );

2) For popup phtmls, I have a problem with the case and name (- versus _)
of the text resource files. Using the dbf2text.php file the following is
created:

[bart at hades GeoservicesBoundingBoxPopup]$ ll *.txt
-rw-rw-r--    1 bart     geo           424 Mar  7 10:34
GeoservicesBoundingBoxPopup.en-ca.txt
-rw-rw-r--    1 bart     geo           475 Mar  7 10:34
GeoservicesBoundingBoxPopup.fr-ca.txt
-rw-rw-r--    1 bart     geo           300 Mar  7 10:34
GeoservicesBoundingBoxPopup.nl-nl.txt

But the php code is looking for ($szResourceFile in loadResource):
geoservicesboundingboxpopup.NL_NL.txt

3) There also seems to be a problem with the case and - versus _ of my
language.

The MLT array uses NL_NL for the language key. The szLanguage variable of
the MLT object is nl-NL. So I had to manually override it in order to get
it to work:

$oMLT->szLanguage ='NL_NL';

What am I doing wrong? Thanks in advance.

Best regards,
Bart



More information about the Chameleon mailing list