[Vtigercrm-developers] access custom module js strings from anywhere

Rubén A. Estrada Orozco rulotec1 at gmail.com
Tue Jun 30 03:36:15 GMT 2020


Thanks for your answer Alan!

I see there's no easy solution. Maybe I'll end up creating a languages
folder inside of my module's layouts folder and put files like en_us.js,
es_mx.js, etc... inside.
The custom folder inside of languages has the downside of
overwriting already existing custom files, so I think that is not an
option. That new feature is cool though.

Saludos

Rubén



On Mon, Jun 29, 2020 at 2:05 AM Alan Lord <alanslists at gmail.com> wrote:

> On 29/06/2020 07:26, Alan Lord wrote:
> > On 28/06/2020 22:31, Rubén A. Estrada Orozco wrote:
> >> Hi everyone,
> >>
> >> I have a custom module and I need to translate it into two languages.
> >> My module has an always visible widget (like quickcreate) that uses
> >> the app.vtranslate JS function. It works ok whenever I'm located in
> >> the listview or a detailview  of my module. Whenever I'm on a
> >> different module, translations break.
> >>
> >> How can I make my JS translation strings be available system-wide
> >> without overwriting the main vtiger.php translation file?
> >
> > Currently you can't:
> >
> > https://code.vtiger.com/vtiger/vtigercrm/issues/1240
>
> This recent MR might go some way to help, but of course if more than one
> extension needs to extend the same language file, e.g. en_us/Vtiger.php
> then it ain't going to work.
>
> https://code.vtiger.com/vtiger/vtigercrm/merge_requests/585
>
> Al
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20200629/147f5762/attachment.html>


More information about the vtigercrm-developers mailing list