[Chameleon] Help - Translation
Normand Savard
nsavard at mapgears.com
Tue Aug 1 23:42:01 EDT 2006
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
More information about the Chameleon
mailing list