[Vtigercrm-developers] How to include a newline in the jsLanguageStrings translations?

Alan Lord alanslists at gmail.com
Fri Aug 6 09:31:46 GMT 2021


I used a console.log statement to look at the translated string *before* 
it is supplied to the app.helper.showConfirmationBox

If I use either a PHP_EOL or a "\n" in the console the newline is shown. 
But the string in the showConfirmationBox is not showing the newline.

Looking at the code for the bootbox, I saw there is a vtiger 
modification which adds a new parameter "htmlSupportEnable". I tried 
setting this to either true or false in the payload json object (and 
having a html tag in the string) but it didn't seem to make any difference.

The newline is visible in the js console, but not in the confirmation 
dialogue.

Al


On 06/08/2021 09:59, Alan Lord wrote:
> Nope - thanks for the suggestion, but I just tried that and it didn't 
> work either.
> 
> To be clear, this issue is ONLY with the $jsLanguageStrings, e.g. 
> translated using the javascript app.vtranslate(label) and not the 
> $languageStrings array which uses the php vtranslate(label, modulename) 
> function.
> 
> Cheers
> 
> Al
> 
> On 06/08/2021 09:52, Angelo Paglialonga wrote:
>> Hi Alan I think I’ve seen some carriage return in vtiger labels maybe 
>> it was in Italian language.
>> So basically just hit ‘return' key , it should work!
>>
> _______________________________________________
> http://www.vtiger.com/




More information about the vtigercrm-developers mailing list