0

first of all I'm an absolute beginner with HTML. I've managed to add a link to an existing portal but I want it to be language dependent. The link is working and depending on your browser language the proper language title is being displayed. Is it possible to make >link< language dependent?

What I tried

  • adding property="value">some text< to the xml files
  • tried to use an id inside ><

Some code

<a href='URL' target=_blank id='myID'>link</a>

nl.xml

<Property id="myID" property="title">Je wordt doorgestuurd naar self service</Property>

en.xml

<Property id="myID" property="title">You'll be redirected to the self-service</Property>

Goal Getting the text of a link language dependent.

UPDATE 2019-07-30: Wow, thanks for your fast responses guys.

@Immortal Dude, I don't see how this should work. The translation itself is already working. I do see the title in the correct language. What I want is the link text to show different languages

@fiveelements. That's the question: How to update the link text?

Link text English -- here

Link text Dutch -- hier

  • Yes , see ref : https://stackoverflow.com/a/8199791/2757519 – Dev Man Jul 28 '19 at 19:35
  • There is no automatic connection between anchor tag and XML by id. First, in javascript code or at server-side code I hope you have read the XML files. Then depending on the browser language pick the value from appropriate XML based on id and update the link text. – fiveelements Jul 28 '19 at 19:46
  • Updatet my post. – Joost Sannen Aug 01 '19 at 09:43

0 Answers0