[Vtigercrm-developers] two modules missing in $app_strings;

David fire ddfire at gmail.com
Thu Feb 26 07:21:24 PST 2009


i found it in the code
function getTranslatedString($str,$module='')
i understand every thing now.
why we come to the world what is my objective in this life and how to
translate strings in vtiger

2009/2/26 David fire <ddfire at gmail.com>

> so if i understand getTranslatedString will check in every module ?
> sorry but i cant find any info about getTranslatedString in the
> vtlib-api-docs
> thanks
> David
>
> 2009/2/26 Asha <asha at vtiger.com>
>
> Hi David,
>>
>> I guess I have created some confusion here. You need not add translation
>> string for all modules in every module's language file.
>>
>> 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
>>
>> 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.
>>
>> Hope this is clear.
>>
>>
>> On 2/26/09, David fire <ddfire at gmail.com> wrote:
>>>
>>> hi
>>> here is a screenshot and the code to generate this screenshoot.
>>>
>>>
>>> Asha but if i make a new module i need to add all other modules name to
>>> the new module?
>>> and the new module name to all the older modules?
>>> this isnt very good....
>>>
>>> i was thinking what about to put xx_xx.lang.php in mysql and the lang
>>> file make the $app_strings and $mod_strings array from the mysql? every
>>> new module add what ever it need to the language database.
>>>
>>>
>>> the code
>>>
>>> function getrelatedoptions()
>>> {
>>>     global $adb,$app_strings;
>>>     $result = $adb->query("SELECT modulename FROM vtiger_entityname");
>>>     $num=$adb->num_rows($result);
>>>     $salida="";
>>>     for($i=0;$i<$num;$i++)
>>>     {
>>>         $salida=$salida."<option value=\"".$adb->query_result($ result,
>>> $i, 'modulename')."\">".$app_strings[$adb->query_result($result, $i,
>>> 'modulename')]."</option>";
>>>     }
>>>     echo $salida;
>>> }
>>>
>>> David
>>>
>>> 2009/2/26 Prasad <prasad at vtiger.com>
>>>
>>>> Hi All,
>>>>
>>>> Kindly share a screenshot if you find there is a translation issue. This
>>>> will help us to analyze the issue faster.
>>>>
>>>> Thanks & Regards,
>>>> Prasad
>>>> vtiger Team
>>>>
>>>>
>>>> On 2/26/09, Asha <asha at vtiger.com> wrote:
>>>>>
>>>>> Hi All,
>>>>>
>>>>> It is better to use getTranslatedString api to get the translated
>>>>> version of a string instead of $app_strings or $mod_strings.
>>>>>
>>>>> 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.
>>>>>
>>>>> 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.
>>>>>
>>>>> On 2/25/09, Prasad <prasad at vtiger.com> wrote:
>>>>>>
>>>>>> Hi Joe,
>>>>>>
>>>>>> Can you please check if this is the issue with 5.1.0-validation1 as
>>>>>> well.
>>>>>>
>>>>>> Regards,
>>>>>> Prasad
>>>>>> vtiger Team
>>>>>>
>>>>>> On 2/25/09, Joe Bordes <joe at tsolucio.com> wrote:
>>>>>>>
>>>>>>>  Hi,
>>>>>>>
>>>>>>> Without this the menu entrance is not translated correctly.
>>>>>>>
>>>>>>> http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5443
>>>>>>>
>>>>>>> Joe
>>>>>>> TSolucio
>>>>>>>
>>>>>>> Prasad escribió:
>>>>>>>
>>>>>>> Hi David,
>>>>>>>
>>>>>>> Thanks for the update with vtlib module we are trying to make sure,
>>>>>>> the core files are not touched/modified.
>>>>>>>
>>>>>>> Hence the entries are not updated in $app_strings ... please do point
>>>>>>> at places where this could cause an issue.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Prasad
>>>>>>> vtiger Team
>>>>>>>
>>>>>>> On 2/25/09, David fire <ddfire at gmail.com> wrote:
>>>>>>>>
>>>>>>>> hi
>>>>>>>> sorry for the missunderstood.
>>>>>>>> the string in the array $app_strings are missing.
>>>>>>>> the file  vtiger/include/language/en_us.lang.php
>>>>>>>> David
>>>>>>>>
>>>>>>>> 2009/2/24 Prasad <prasad at vtiger.com>
>>>>>>>>
>>>>>>>>> Hi David,
>>>>>>>>>
>>>>>>>>> The modules added through vtlib follow the same directory structure
>>>>>>>>> as any standard module.
>>>>>>>>> You should find the translation file in
>>>>>>>>> modules/Services/language/en_us.lang.php
>>>>>>>>>
>>>>>>>>> Kindly update us from which build/SVN revision did you find the
>>>>>>>>> files missing?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Prasad
>>>>>>>>> vtiger Team
>>>>>>>>>
>>>>>>>>>  On 2/24/09, David fire <ddfire at gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>>  hi this modules are missing in en_us.lang.php "Services" and
>>>>>>>>>> "ServiceContracts".
>>>>>>>>>>
>>>>>>>>>> by the way the new modules added by vtlib where is stored the
>>>>>>>>>> translation info?
>>>>>>>>>> thanks
>>>>>>>>>> David
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> (\__/)
>>>>>>>>>> (='.'=)This is Bunny. Copy and paste bunny into your
>>>>>>>>>> (")_(")signature to help him gain world domination.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  _______________________________________________
>>>>>>>>>> Reach hundreds of potential candidates - http://jobs.vtiger.com
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Reach hundreds of potential candidates - http://jobs.vtiger.com
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> (\__/)
>>>>>>>> (='.'=)This is Bunny. Copy and paste bunny into your
>>>>>>>> (")_(")signature to help him gain world domination.
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Reach hundreds of potential candidates - http://jobs.vtiger.com
>>>>>>>>
>>>>>>>
>>>>>>> ------------------------------
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Reach hundreds of potential candidates - http://jobs.vtiger.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Reach hundreds of potential candidates - http://jobs.vtiger.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Reach hundreds of potential candidates - http://jobs.vtiger.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Asha
>>>>> vtiger Team
>>>>> _______________________________________________
>>>>> Reach hundreds of potential candidates - http://jobs.vtiger.com
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Reach hundreds of potential candidates - http://jobs.vtiger.com
>>>>
>>>
>>>
>>>
>>> --
>>> (\__/)
>>> (='.'=)This is Bunny. Copy and paste bunny into your
>>> (")_(")signature to help him gain world domination.
>>>
>>>
>>> _______________________________________________
>>> Reach hundreds of potential candidates - http://jobs.vtiger.com
>>>
>>
>>
>>
>> --
>> Regards,
>> Asha
>> vtiger Team
>>
>> _______________________________________________
>> Reach hundreds of potential candidates - http://jobs.vtiger.com
>>
>
>
>
> --
> (\__/)
> (='.'=)This is Bunny. Copy and paste bunny into your
> (")_(")signature to help him gain world domination.
>
>


-- 
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20090226/f6d35b76/attachment-0003.html 


More information about the vtigercrm-developers mailing list