[Chameleon] Help - problem with Translation

Eijnden, Bart van den (AGI) b.vdeijnden at agi.rws.minvenw.nl
Thu Aug 3 10:34:23 EDT 2006


There is a setting in chameleon.xml which determines caching of language texts or not. Try to disable that (like I did below), or remove the cached file.

    <context-param>
        <param-name>cache_mlt</param-name>
        <param-value>false</param-value>
        <description>This option controls whether or not the MLT language translation file is cached or not.  Values are "true" and "false"</description>
    </context-param>

Best regards,
Bart

-----Oorspronkelijk bericht-----
Van: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org]Namens Ines
Verzonden: donderdag 3 augustus 2006 16:28
Aan: chameleon at lists.maptools.org
Onderwerp: [Chameleon] Help - problem with Translation



Norm,

I can't translate that. I think I'm making something wrong.

I did just it:

In: \ms4w\apps\"myapp"\htdocs\widgets\PrintProduction 

I added this two files: Production.sp-CA.txt and Print.sp-CA.txt for
Spanish translation.

Then, I opened Production.sp-CA.txt and I have this values:

0)Map Production
1)Seleccione y posicone the cartographic elements that should appear on
the final map layout.
2)Element
3)Position
4)Value .... Etc

Then I traslated every value in spanish:

0)Preoduccion de Mapas
1)Seleccione y posicione
2)Elemento
3)Posicion
4)Valor .... Etc

Now, I execute the aplication but I don't see any change. The content of
"Print Production" Windows is still in english. 

So, I did it just to prove:

In: \ms4w\apps\"chameleon"\htdocs\widgets\PrintProduction 

I opened the  Production.fr-CA.txt file. I can see the content. I
changed the first value just to prove:

0)Production d'une carte   for:   0)Produccion de Mapas

I executed the aplication:
http://localhost/chameleon/samples/sample_bilingual.phtml

But I see that in the "Print Production" window the title is the same:
"Production d'une carte" (don't take the change)

I think Chameleon don't take my changes or I think I have to do some
another reference in some file/s for chameleon take my changes. I can't
find the way to do it.

Thank You Again.

Ines


 


Ines wrote:

>Norm,
> I looked the files into the PrintProduction folder but the text to 
>translate is in the "production.phtml" file. I don't undesrstand very
>well:
>  
>
I guess you are refering to the text in the get method like the
following:

<title><?php echo $oMLT->get( 'Production', '0', 'Map Production' ); 
?></title>

found in the "production.phtml".

The get method of the MLT object uses the resource file to return the 
translated text. The first parameter of the get method is the resource 
file name. Depending of what language is set either one of the following

file is used: Production.en-CA.txt, Production.fr-CA.txt and 
Production.language-COUNTRY.txt.  The second parameter is the index 
found in the resource file before the parenthesis.  The last parameter 
is the default value in case the resource file is not found.

>I have to do this:
>Print.fr-CA.txt, Print.en-CA.txt, Production.en-CA.txt and 
>Production.fr-CA.txt,  adding
>Print.language-COUNTRY.txt and Production.language-COUNTRY.txt
>
>and then? Do I have to duplicate the production.phtml file too?   or
>anything more?
>
>  
>
No you don't have to duplicate the "production.phtml" file.  Just add 
the appropriate resource file for your language and edit the file to 
translate all the text in this language.

Norm

_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon


Disclaimer
************************************************************************
Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te 
informeren. Wij adviseren u om bij twijfel over de juistheid of de 
volledigheid van de mail contact met afzender op te nemen.

This message shall not constitute any rights or obligations.
This message is intended solely for the addressee.
If you have received this message in error, please delete it and
notify the sender immediately. When in doubt whether this message
is correct or complete, please contact the sender.
************************************************************************




More information about the Chameleon mailing list