i found it in the code <br>function getTranslatedString($str,$module='')<br>i understand every thing now.<br>why we come to the world what is my objective in this life and how to translate strings in vtiger<br><br>
<div class="gmail_quote">2009/2/26 David fire <span dir="ltr"><<a href="mailto:ddfire@gmail.com">ddfire@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
so if i understand getTranslatedString will check in every module ?<br>sorry but i cant find any info about getTranslatedString in the vtlib-api-docs <br>thanks<br>David<br><br><div class="gmail_quote">2009/2/26 Asha <span dir="ltr"><<a href="mailto:asha@vtiger.com" target="_blank">asha@vtiger.com</a>></span><div>
<div></div><div class="Wj3C7c"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi David,<br><br>I guess I have created some confusion here. You need not add translation string for all modules in every module's language file.<br>
<br>What I meant was, you can have the translation string for a module name either in include/language/en_us.lang.php or in modules/<ModuleName>/language/en_us.lang.php<br>
<br>If you use getTranslatedString, passing the correct module name as parameter, for every string, it will first check if the translation exists in include/language/en_us.lang.php. If the translation doesn't exist there, it will get the translation from modules/<ModuleName>/language/en_us.lang.php. If even there the translation is not found, the string is returned as it is.<br>
<br>Hope this is clear.<div><div></div><div><br><br><div><span class="gmail_quote">On 2/26/09, <b class="gmail_sendername">David fire</b> <<a href="mailto:ddfire@gmail.com" target="_blank">ddfire@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi<br>here is a screenshot and the code to generate this screenshoot.<br><br><br>Asha but if i make a new module i need to add all other modules name to the new module? <br>and the new module name to all the older modules?<br>
this isnt very good....<br><br>i was thinking what about to put xx_xx.lang.php in mysql and the lang file make the $app_<div>strings and $mod_strings array from the mysql? every new module add what ever it need to the language database.<br>
<br></div><br>the code <br><span><br>function getrelatedoptions()<br>{<br> global $adb,$app_strings;<br> $result = $adb->query("SELECT modulename FROM vtiger_entityname");<br>
$num=$adb->num_rows($result);<br> $salida="";<br> for($i=0;$i<$num;$i++)<br> {<br> $salida=$salida."<option value=\"".$adb->query_result($<div>
result, $i, 'modulename')."\">".$app_strings[$adb->query_result($result, $i, 'modulename')]."</option>";<br>
}<br> echo $salida;<br>}</div><br></span>David<br><br><div class="gmail_quote">2009/2/26 Prasad <span dir="ltr"><<a href="mailto:prasad@vtiger.com" target="_blank">prasad@vtiger.com</a>></span><div>
<span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi All,<br><br>Kindly share a screenshot if you find there is a translation issue. This will help us to analyze the issue faster.<br><br>Thanks & Regards,<br><font color="#888888">Prasad<br>vtiger Team</font><div><div>
</div><div><br><br><div><span class="gmail_quote">On 2/26/09, <b class="gmail_sendername">Asha</b> <<a href="mailto:asha@vtiger.com" target="_blank">asha@vtiger.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi All,<br><br>It is better to use getTranslatedString api to get the translated version of a string instead of $app_strings or $mod_strings.<br><br>With 5.1.0 and Vtlib, our main idea is to develop things without touching the core files. So we do not want to touch include/language/en_us.lang.php file to add the language strings.<br>
<br>Instead the language strings should be added to <ModuleName>/language/en_us.lang.php for the newly added modules. getTranslatedString should let you fetch from this file, if the language translation doesn't exist in $app_strings.<div>
<span><br>
<br><div><span class="gmail_quote">On 2/25/09, <b class="gmail_sendername">Prasad</b> <<a href="mailto:prasad@vtiger.com" target="_blank">prasad@vtiger.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Joe,<br><br>Can you please check if this is the issue with 5.1.0-validation1 as well.<br><br>Regards,<br><span>Prasad<br>vtiger Team</span><div><span><br><br><div><span class="gmail_quote">On 2/25/09, <b class="gmail_sendername">Joe Bordes</b> <<a href="mailto:joe@tsolucio.com" target="_blank">joe@tsolucio.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
Without this the menu entrance is not translated correctly.<br>
<br>
<a href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5443" target="_blank">http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5443</a><br>
<br>
Joe<br>
TSolucio<br>
<br>
Prasad escribió:
<blockquote cite="http://mid39d18b250902250543n63a3882etdeca964463d9d5b2@mail.gmail.com" type="cite"><div><span>Hi David,<br>
<br>
Thanks for the update with vtlib module we are trying to make sure, the
core files are not touched/modified.<br>
<br>
Hence the entries are not updated in $app_strings ... please do point
at places where this could cause an issue.<br>
<br>
Regards,<br>
Prasad<br>
vtiger Team<br>
<br>
<div><span class="gmail_quote">On 2/25/09, <b class="gmail_sendername">David fire</b> <<a href="mailto:ddfire@gmail.com" target="_blank">ddfire@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">hi<br>
sorry for the missunderstood.<br>
the string in the array $app_strings are missing.<br>
the file vtiger/include/language/en_us.lang.php <br>
David<br>
<br>
<div class="gmail_quote">2009/2/24 Prasad <span dir="ltr"><<a href="mailto:prasad@vtiger.com" target="_blank">prasad@vtiger.com</a>></span><span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi
David,<br>
<br>
The modules added through vtlib follow the same directory structure as
any standard module.<br>
You should find the translation file in
modules/Services/language/en_us.lang.php<br>
<br>
Kindly update us from which build/SVN revision did you find the files
missing?<br>
<br>
Regards,<br>
Prasad<br>
vtiger Team<br>
<br>
<div>
<div>
<div><span class="gmail_quote">On 2/24/09, <b class="gmail_sendername">David fire</b> <<a href="mailto:ddfire@gmail.com" target="_blank">ddfire@gmail.com</a>>
wrote:</span></div>
</div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div>hi this modules are missing in en_us.lang.php "Services"
and "ServiceContracts".<br>
<br>
by the way the new modules added by vtlib where is stored the
translation info?<br>
thanks<br>
David<br>
<span><br clear="all">
<br>
-- <br>
(\__/) <br>
(='.'=)This is Bunny. Copy and paste bunny into your <br>
(")_(")signature to help him gain world domination. <br>
<br>
</span><br>
</div>
</div>
_______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a>
<br>
</blockquote>
</div>
<br>
<br>
_______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a>
<br>
</blockquote>
</span></div>
<div><span><br>
<br clear="all">
<br>
-- <br>
(\__/) <br>
(='.'=)This is Bunny. Copy and paste bunny into your <br>
(")_(")signature to help him gain world domination. <br>
<br>
</span></div>
<br>
_______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a>
<br>
</blockquote>
</div>
<br>
</span></div><pre><hr size="4" width="90%"><span><br>_______________________________________________<br>Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a> </span></pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a> <br></blockquote></div><br>
</span></div><br>_______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a> <br></blockquote></div><br><br clear="all"><br></span></div>
<span>-- <br>
Regards,<br>Asha<br>vtiger Team
</span><br>_______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a> <br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a> <br></blockquote></span></div></div><div><span><br>
<br clear="all"><br>-- <br> (\__/) <br>(='.'=)This is Bunny. Copy and paste bunny into your <br>
(")_(")signature to help him gain world domination. <br><br>
</span></div><br>_______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a> <br></blockquote></div><br><br clear="all"><br>-- <br>
Regards,<br>Asha<br>vtiger Team
</div></div><br>_______________________________________________<br>
Reach hundreds of potential candidates - <a href="http://jobs.vtiger.com" target="_blank">http://jobs.vtiger.com</a> <br></blockquote></div></div></div><div><div></div><div class="Wj3C7c"><br><br clear="all"><br>-- <br> (\__/) <br>
(='.'=)This is Bunny. Copy and paste bunny into your <br>
(")_(")signature to help him gain world domination. <br><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> (\__/) <br>(='.'=)This is Bunny. Copy and paste bunny into your <br>(")_(")signature to help him gain world domination. <br><br>