Highlighted

Translating/updating image and text link in web form

Avatar

Avatar

jasonw30638826

Avatar

jasonw30638826

jasonw30638826

26-10-2019

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.

1847358_pastedImage_0.png

Thanks,

Replies

Highlighted

Avatar

Avatar

Jyoti_Y

MVP

Avatar

Jyoti_Y

MVP

Jyoti_Y
MVP

28-10-2019

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.

Highlighted

Avatar

Avatar

jasonw30638826

Avatar

jasonw30638826

jasonw30638826

29-10-2019

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,

Highlighted

Avatar

Avatar

jasonw30638826

Avatar

jasonw30638826

jasonw30638826

04-11-2019

Hi,

This is not resolved, can anyone help with this?

Thanks,

Highlighted

Avatar

Avatar

wodnicki

MVP

Avatar

wodnicki

MVP

wodnicki
MVP

05-11-2019

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

Highlighted

Avatar

Avatar

jasonw30638826

Avatar

jasonw30638826

jasonw30638826

05-11-2019

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

Highlighted

Avatar

Avatar

wodnicki

MVP

Avatar

wodnicki

MVP

wodnicki
MVP

06-11-2019

<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>

Highlighted

Avatar

Avatar

jasonw30638826

Avatar

jasonw30638826

jasonw30638826

07-11-2019

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