<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>

<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.2">
<TITLE>Thoughts on Picklist translation problem</TITLE>
</HEAD>
<BODY>
<BR>

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
<BR><FONT SIZE=2 FACE="Arial">I refer to the following Ticket in Bug Tracker</FONT>
<BR><A HREF="http://vtiger.fosslabs.com/cgi-bin/trac.cgi/ticket/2214"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://vtiger.fosslabs.com/cgi-bin/trac.cgi/ticket/2214</FONT></U></A>
</P>

<P><FONT SIZE=2 FACE="Arial">I thought a little bit about that and found the following approach:</FONT>
<BR><FONT SIZE=2 FACE="Arial">Prerequisites:</FONT>
<BR><FONT SIZE=2 FACE="Arial">Clean install of Version 5.0.0 GA</FONT>
<BR><FONT SIZE=2 FACE="Arial">Language Files installed (German in my case)</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Problem is that you can see the German translation of the pick list values in the pick list Editor but not in </FONT>
<BR><FONT SIZE=2 FACE="Arial">the application.</FONT>
<BR><FONT SIZE=2 FACE="Arial">I searched and found that in the smarty templates the language related code is not implemented. </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">i.E.:</FONT>
<BR><FONT SIZE=2 FACE="Arial">In ListViewEntries.tpl</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">there is code like that:</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">{foreach item=data from=$entity}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">&lt;td&gt;{$data}&lt;/td&gt;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {/foreach}</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR><FONT SIZE=2 FACE="Arial">if you change it to:</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">{foreach item=data from=$entity}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">&lt;td&gt;{if $MOD[$data] neq ''}</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">{$MOD[$data]}</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">{else}</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">{$data}</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">{/if}</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">&lt;/td&gt;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {/foreach}</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=2 FACE="Arial">the translated Pick list values are shown.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I found several places where i modified the code in that way.</FONT>
</P>

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

<P><FONT SIZE=2 FACE="Arial">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</FONT>
<BR><FONT SIZE=2 FACE="Arial">then en_us the values (all, also the already present) are stored in the appropriate table as the translated strings.</FONT>
<BR><FONT SIZE=2 FACE="Arial">This doesn't matter if you are working only in one language, but if you use more than one you have a problem.</FONT>
</P>

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

<P><FONT SIZE=2 FACE="Arial">Any comments are highly appreciated</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Andreas</FONT>
</P>

</BODY>
</HTML>