Luigi

the problem is related to the LABELITEM tag. Substitute in 
/incphp/initgroups.php line 159

$labelItem = _p($mapLay->labelitem);

with the following

$labelItem = $mapLay->labelitem{0} == "@" ? 
_p(substr($mapLay->labelitem, 1)) : $mapLay->labelitem;

The patch is also committed to latest-stable and trunk

e.g. 
http://svn.pmapper.net/trac/browser/pmapper/branches/latest-stable/incphp/initgroups.php

The original idea was to allow the definition of labelitem based on 
fields depending on the language (that should just have happened in the 
case of '@' prefix of the field name).

armin


On 07/06/2008 16:03, Luigi Castro Cardeles wrote:
> good morning list,
> 
> i was using languge_br.php for translating string to portuguese brazilian.
> But when the string i want to translate is in DATA definition at mapfile, it
> is translated too.
> for example:
> 
> ===mapfile - layer definition===
> ....
> NAME 'layer1'
> DATA "the geom from table using unique gid using srid =xxxx"
> ....
> LABELITEM "text_local"
> CLASS
>          NAME "text_local"
> .......
> ===end of layer definition====
> 
> 
> 
> =====language_xx.php====
> ....
> $_sl['text_local'] = 'Text Local';
> ....
> =====end of language_xx.php===
> 
> 
> If i do that, i get the error from php_error.log (error log of php):
> 
> ------ error message -----------------
> [07-Jun-2008 10:49:05] PHP Warning:  [MapServer Error]: msDrawMap(): Failed
> to draw layer named 'layer1'.
>  in /var/www/html/map_application/incphp/map.php on line 304
> [07-Jun-2008 10:49:05] PHP Warning:  [MapServer Error]: prepare_database():
> Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE
> mycursor BINARY CURSOR FOR SELECT "Text
> Local"::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text
> from table WHERE the_geom && setSRID('BOX3D(717664.90866225
> 7535268.333,738185.10733775 7544802.333)'::BOX3D, 29191 )'
> 
> Postgresql reports the error as 'ERROR:  column "Text Local" does not exist
> LINE 1: DECLARE mycursor BINARY CURSOR FOR SELECT "Text Local"::text,...
> 
> ------ end of error message ----------
> 
> is this expect or is a bug?
> i think that language_xx.php translated only NAME, DESCRIPTION and similar
> fields and do not translate DATA field.
> 


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to