Hi,
I am working on creating a web form in English and French. I am able to translate the text but not the images and hyperlinks. Is there any way to use different images and link for different languages. I can't find image or hyperlink from the translation setting below.
Thanks,
Hi,
You can add URL translation at :
Administration --> Configuration --> Global Dictionary --> User Dictionary.
Enter your url in preferred language. Choose correct language and approve your translation.
Note: Make sure sourceId and sourceStringId is correctly mapped. Your translation should be mapped to correct webApp, so that it can translate it correctly.
Thanks.
Hi,
Thanks for your reply.
My issue is I don't know that what SourceID and SourceStringId to be used in HTML for URLs.
For example the HTML code below, I am able to translate "Learn more", but not sure how to add sourceID to the URL "http://www.google.com" to translate to "http://www.google.fr"
<div><a class="nl-dce-translate" id="subNewsletter.htmlPage.line11" href="http://www.google.com/en" data-nl-localizable="true">Learn more</a></div>
Please send me an example on how to add the sourceID to the URL above.
Thanks,
Views
Replies
Total Likes
Hi,
This is not resolved, can anyone help with this?
Thanks,
Views
Replies
Total Likes
Hi,
Use this:
<div><a class="nl-dce-translate" id="subNewsletter.htmlPage.line11" href="http://www.google.<%= NL.session.locale.getLanguage() === 'fr' ? 'fr' : 'com' %>" data-nl-localizable="true">Learn more</a></div>
Thanks,
-Jon
Hi Jon,
Thanks for you help, I think this works great for this case. However, most of the time, English and French URL will be totally different.
Case 1 hyperlink:
<div><a class="nl-dce-translate" id="subNewsletter.htmlPage.line11" href="http://englishsite11.com" data-nl-localizable="true">Learn more</a></div>
I'd like to translate the URL above from http://englishsite11.com/ to http://frenchsite22.com
Case 2 image link:
<div><a href="https://www.englishsite11.com/"><img src="https://englishsite11.com/logoEN.jpg" alt="logo"></a></div>
I'd like to translate https://www.englishsite11.com/ to http://frenchsite22.com/ and
translate from https://englishsite11.com/logoEN.jpg to https://frenchsite22.com/logofr.jpg
Thanks in advance!
Jason
<div><a class="nl-dce-translate" id="subNewsletter.htmlPage.line11" href="<%= NL.session.locale.getLanguage() === 'fr' ? 'http://frenchsite22.com' : 'http://englishsite11.com' %>" data-nl-localizable="true">Learn more</a></div>
<div><a href="<%= NL.session.locale.getLanguage() === 'fr' ? 'http://frenchsite22.com' : 'http://englishsite11.com' %>"><img src="<%= NL.session.locale.getLanguage() === 'fr' ? 'https://frenchsite22.com/logofr.jpg' : 'https://englishsite11.com/logoEN.jpg' %>" alt="logo"></a></div>
Thank you so much Jon! I tried your code, when I tested the French version of the form, like https://mysite.com/webApp/webform?lang=fr, it still shows the English link, http://englishsite11.com/. I assume this will work when user's computer locale set to a French location?
Thanks Again.
Jason
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies