Issue with Translating URL to different language with URL type variable

shyamkumar VK
Kilo Patron

Hi All ,

I had created variable type "URL" and Included URL in default , this is working fine for English language.

when we switch to Another language Question label is getting translated but URL is not getting translated 

NOTE : we have two different URL's for English and French 

I had changed label of French by switching to French language in portal and pasted the Translated French label in the variable

can anyone help with Inputs here.

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar
1 ACCEPTED SOLUTION

Hi,

don't use gs.getMessage() if you have not created any record in messages table

use this as default value

javascript: gs.getUser().getLanguage() == 'en' ?  'https://www.google.com' :  'url in spanish'

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

default value script is already shared above

what did you try and what is not working?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

how to call different URL in reference qualifier for message we have gs.getmessage , how can we do for URL

@Ankur Bawiskar 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

Hi,

are you storing URL in messages table for each language?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

no I did not store Ankur , I have question what is key in the Message what should I pass in the key , actually I'm new to translation hope you understand

@Ankur Bawiskar 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

Hi,

don't use gs.getMessage() if you have not created any record in messages table

use this as default value

javascript: gs.getUser().getLanguage() == 'en' ?  'https://www.google.com' :  'url in spanish'

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader