NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Rob Kolanko on July 18, 2012, 11:34:18 AM
-
Messages that contain double quotes which are copied to loc:alert are displayed in the popup window with " rather than ".
Is there a way to permit the double quote to appear normally?
Thanks,
Rob Kolanko
-
Hi Rob,
I've tried to duplicate here in the "Validation" example, but I'm getting the quotes in the popup message fine.
Can you maybe tweak an example to show the effect?
cheers
Bruce
-
Hi Bruce,
I found that the issue is being caused by p_web.Translate() method. In the validation example change the loc:alert line in the embed in MailboxesFormControl to:
loc:alert = p_web.Translate('The nickname Must be longer than "4" characters')
Then trigger the error message and you will see that the quotes are being changed on the pop-up message but not on the web page.
As you likely know the solution is to add the “AllowHTML” parameter as follows:
loc:alert = p_web.Translate('The nickname Must be longer than "4" characters',1)
My immediate problem has been solved.
However, my application will eventually have both an English and French interface. My current application which I converting to NetTalk is bilingual, thus I have most of the phrases all ready translated. I have been using Translate method wherever possible. I will need to put my translation code in the WebHandler embed before the parent call. But should I let the translated string pass to the parent? What is the purpose of the converting the string to HTML here?
Thanks,
Rob Kolanko
-
let me see what I can do for the next build...
-
ok, sorted for the next build. (6.38)
cheers
Bruce