[Vtigercrm-developers] Thoughts on Picklist translation problem

Reiche, Andreas Andreas.Reiche at LGN.Niedersachsen.de
Thu Oct 12 02:56:41 PDT 2006


Hi, 
I refer to the following Ticket in Bug Tracker 
 <http://vtiger.fosslabs.com/cgi-bin/trac.cgi/ticket/2214>
http://vtiger.fosslabs.com/cgi-bin/trac.cgi/ticket/2214 

I thought a little bit about that and found the following approach: 
Prerequisites: 
Clean install of Version 5.0.0 GA 
Language Files installed (German in my case) 

Problem is that you can see the German translation of the pick list
values in the pick list Editor but not in 
the application. 
I searched and found that in the smarty templates the language related
code is not implemented. 

i.E.: 
In ListViewEntries.tpl 

there is code like that: 

                        {foreach item=data from=$entity}        
                        <td>{$data}</td> 
              {/foreach} 
        
if you change it to: 
                        {foreach item=data from=$entity}        
                        <td>{if $MOD[$data] neq ''} 
                                {$MOD[$data]} 
                        {else} 
                                {$data} 
                        {/if} 
                        </td> 
              {/foreach} 
              
the translated Pick list values are shown. 

I found several places where i modified the code in that way. 

But there are a few more problems 
If you have a field shown in the related lists the $MOD{...} will not
work because the $MODULE is filled 
with the Module of the 'Main' Record not of the different related
records. 
This leads to another approach: 
The translation of the Pick List Values have to be done in
/include/language/langfile and not in the module langfiles. 
This way you can reference the translation by the $APP array. 

Another Problem in 5.0.0 GA (don't know about the patch) is, when you
modifiy the pick list entries in a language other 
then en_us the values (all, also the already present) are stored in the
appropriate table as the translated strings. 
This doesn't matter if you are working only in one language, but if you
use more than one you have a problem. 

What i like to see is the following: 
-Move the translation of the pick list values to the
/include/language/langfiles 
-Modify the templates in above manner (willing to help) 
-The Pick List Editor should not save the already defined values in a
foreign language 
(Don't know yet how to implement that, because i'm a beginner in the PHP
stuff) 
-and finally the way to edit pick list in the following manner: 
Delete an entry(except non editable) -> simply delete 
add an entry -> add in english and modify the lang files for translation


Any comments are highly appreciated 

Andreas 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20061012/c645ac4c/attachment-0004.html 


More information about the vtigercrm-developers mailing list