<div dir="ltr">Hi Istvan,<div><br></div><div>Yes, you are correct for uitype 33 we have this problem. This is happening because in Multipicklist.tpl (layouts/vlayout/modules/Vtiger/uitypes) on iterating over $PICKLIST_VALUES to create option tag, for value attribute we are placing value of $PICKLIST_VALUES array instead of key, where value will change according to language,but key remains same. Which we want to use for value attribute.</div>
<div><br></div><div>I have created <a href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8119">trac </a>for same. Will update the fix soon :)</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 1, 2014 at 10:07 PM, Holbok István <span dir="ltr"><<a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Hi Uma,<br>
<br>
I double check again the 2nd issue.<br>
With UIType 15, 16 works as you described below. The database will
store the original picklist item (in English) and the translation
engine will show the translated.<br>
<br>
With UIType 33 (multi-select picklist) the system works as I
described in my first letter. <br>
<img alt="" src="cid:part1.08010705.01040109@gmail.com" height="203" width="364"><br>
Here is the screen shot from the database. <br>
But, it is true, no one of vtiger modules use UIType 33, so you
could not test it.<br>
<br>
I used UIType 33 in my custom module.<br>
<br>
I also checked it with Custom field (UItype 33). <b>This is the
method of reproduction of this bug.</b><br>
<br>
Here is the created Custom field for the module Leads:<br>
<img alt="" src="cid:part2.07030502.07030506@gmail.com" height="393" width="619"><br>
<br>
<img alt="" src="cid:part3.09030400.06060205@gmail.com" height="378" width="722"><br>
<br>
And here is the stored data.<br>
The first row was entered as a user with English language
interface.<br>
The second row was entered by the too same user but the language
interface was changed into Hungarian. <br>
<br>
<img alt="" src="cid:part4.08080606.05060808@gmail.com" height="302" width="800"><br>
The words 'Big', 'Small' was translated by the translate engine
and they were stored as they were displayed in the second row.<br>
<br>
Kindest regards:<br>
István<br>
<br>
<br>
<div>üdvözlettel:<br>
<br>
<b>Holbok István</b><br>
<br>
+3670-342-0900<br>
<b>e-mail:</b> <a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a><br>
<b>SkyPe:</b> holboki<br>
<br>
</div>
2014.07.01. 14:40 keltezéssel, Uma S írta:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Istvan,
<div><br>
</div>
<div><b style="font-family:arial,sans-serif;font-size:13px">(1)
if you will create a Custom module </b><br>
</div>
<div><b style="font-family:arial,sans-serif;font-size:13px"><br>
</b></div>
<div><font face="arial, sans-serif">In this case, if your custom
module has relevant translations and in tpl while calling
vtranslate() api for translation, If the second parameter is
CustomModuleName and whose parent is Settings. Then
translations will be picked from </font><span style="font-size:13px;font-family:arial,sans-serif">/languages/en_us/Settings/</span><span style="font-size:13px;font-family:arial,sans-serif">Custommodule.php,
If this doesn't contain expected key value pair, then
fallback for </span><span style="font-size:13px;font-family:arial,sans-serif">/languages/en_us/Settings/</span><span style="font-size:13px;font-family:arial,sans-serif">Vtiger.php.</span></div>
<div><span style="font-size:13px;font-family:arial,sans-serif"><br>
</span></div>
<div><b style="font-family:arial,sans-serif;font-size:13px">(2)
Translation engine issues </b><b><font face="arial,
sans-serif">with pick-list texts.</font></b><span style="font-size:13px;font-family:arial,sans-serif"><br>
</span></div>
<div><b style="font-family:arial,sans-serif;font-size:13px"><br>
</b></div>
<div><font face="arial, sans-serif">For any custom pick-list we
create, What ever the value given by the user will be saved
into database, While rendering these pick-list. For example
in picklist.tpl file where we render pick-list,
which requests for getPicklistValues() in
modules/Vtiger/models/Field.php file. Here the key is
non-translated value as stored in database, but value is
translated value. So on form submit key values will sent
which remains same in all languages.</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif">With</font></div>
<div><font face="arial, sans-serif">Best Regards</font></div>
<div>
<font face="arial, sans-serif">Uma S</font></div>
<div><font face="arial, sans-serif">Vtiger Team</font></div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Jul 1, 2014 at 4:11 PM, Holbok
István <span dir="ltr"><<a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> Dear Vtiger Team,<br>
<br>
There are a small, minor issues in the translation system
of vtiger 6.<br>
<br>
<b>(1) if you will create a Custom module</b> with
necessary en_us language files still will be missing
language keys from the <br>
/languages/en_us/Vtiger.php<br>
/languages/en_us/Settings/Vtiger.php<br>
For example the Custom module has settings page, and
defined the Links e.g. under Integration menu on the left
panel, there will be a LABEL e.g. LABEL_CUSTOM_MODULE but
not a translated string.<br>
<br>
The reason is: vtiger translation engine is looking for
the string in the /languages/en_us/Settings/Vtiger.php
file if you are in the <br>
place
<vtiger>/index.php?module=Vtiger&parent=Settings&view=Index<br>
And the translation engine will not find the translated
keys in the file
/languages/en_us/Settings/Custommodule.php<br>
<br>
This issue also valid for the main menu system that uses
keys from the /languages/en_us/Vtiger.php file.<br>
<br>
<b>Bad solution today is:</b> adding manually - after
install - the missing language keys => value pairs to
the /languages/en_us/Vtiger.php &
/languages/en_us/Settings/Vtiger.php .<br>
But this solution is against the vtiger store policy
changing core files. (You can see in the
/languages/hu_hu/Vtiger.php &
/languages/hu_hu/Settings/Vtiger.php these added dozens of
plus keys.)<br>
<br>
<b>Suggested solutions:</b> create a vtlib function and a
/languages/en_us/Common.php &
/languages/hu_hu/Settings/Common.php files to handle this
issue.<br>
The vtlib function simple will open the Common.php
language files (for the named language) and will append
the provided missing key => value pairs to the end of
the file (if the provided keys are not exist already).<br>
<br>
<b>(2) Translation engine issues </b><b>with picklist
texts.</b><br>
Unfortunately the picklist (and multi-select picklist)
fields data will store in the database in text form and
these texts are subject of translation.<br>
The translations are necessary, but there is better
storage form then text.<br>
<br>
For example the vtiger system uses 2 languages (Hungarian
and English). <br>
Note: the multi-language usage in Central Europe is very
widespread. For example my consultant association works in
10 CE countries, and our vtiger users from these countries
and they use this vtiger instance in English, German,
Hungarian, Romanian, etc. languages.<br>
<br>
So, there is a 2 language vtiger system and there is a
picklist with words 'big', 'medium', 'small' and in the
language file there are translation in order 'nagy',
'közepes', 'kicsi'.<br>
<br>
If the English user will pick the 1st item, the field will
store 'big' as a content. In multi-select will be stored
e.g. 'big |##| medium'. The Hungarian user will pick the
1st item the field will store 'nagy' as a content. In
multi-select will be stored e.g. 'nagy |##| közepes'.<br>
<br>
And this case will cause <b>IMPOSSIBILITY </b>to search
in the database.<br>
<br>
My suggestion is to store in the database the picklist ID
but not the picklist label. The picklis ID will be too
same using different languages.<br>
For example here is the activitytype picklist.<br>
<p><strong>SQL
lekérdezés:</strong><span> </span>SELECT * FROM
`vtiger_activitytype` LIMIT 0, 25 ;<br>
<strong>Sorok:</strong><span> </span>3</p>
<div>
<table style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);border-collapse:collapse;border-spacing:0px;background-color:rgb(255,255,255)">
<thead><tr>
<th style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;font-weight:bold;background-color:rgb(229,229,229)">activitytypeid</th>
<th style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;font-weight:bold;background-color:rgb(229,229,229)">activitytype</th>
<th style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;font-weight:bold;background-color:rgb(229,229,229)">presence</th>
<th style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;font-weight:bold;background-color:rgb(229,229,229)">picklist_valueid</th>
<th style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;font-weight:bold;background-color:rgb(229,229,229)">sortorderid</th>
</tr>
</thead><tbody>
<tr>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">1</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;background-color:rgb(255,255,255)">Call</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">0</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">12</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">0</td>
</tr>
<tr>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">2</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;background-color:rgb(255,255,255)">Meeting</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">0</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">13</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">1</td>
</tr>
<tr>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">3</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;background-color:rgb(255,255,255)">Mobile
Call</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">0</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">321</td>
<td style="color:rgb(0,0,0);border:0.1em solid rgb(0,0,0);padding:0.2em;white-space:nowrap;background-color:rgb(255,255,255)">1</td>
</tr>
</tbody>
</table>
</div>
<br>
If we will store in the database the activitytypeid as
picklist ID, it will be too same for every language.<br>
For the multi-select we can store '1 |##| 2' instead of
the confused translated or not translated labels from the
second column.<br>
<br>
Of course these solutions will change the UIType handling
engines and the search engine also.<br>
So, the database will contain the indexes (from the 1st
column), the translating engine will show the labels from
the second column or labels from the language files.<br>
<br>
Kindest regards:<br>
Istvan<span><font color="#888888"><br>
<br>
<div>-- <br>
üdvözlettel:<br>
<br>
<b>Holbok István</b><br>
<br>
+3670-342-0900<br>
<b>e-mail:</b> <a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a><br>
<b>SkyPe:</b> holboki<br>
<br>
</div>
</font></span></div>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote>
</div>
<br>
<br clear="all"><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
-- <br>
<div dir="ltr">With<br>
Best Regards<br>
Uma.S<br>
<div>Vtiger Team</div>
</div>
</font></span></div>
</blockquote>
<br>
<br>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">With<br>Best Regards<br>Uma.S<br><div>Vtiger Team</div></div>
</div>