This question is not a duplicate of Get meta data attribute in javascript. I'd like to get meta name
by language.
I have the following in HTML code:
<meta name="DC.Subject" xml:lang="pl" content="wróg" />
<meta name="DC.Subject" xml:lang="en" content="enemy" />
There are also other meta name
tags in HTML.
It is quite easy to get the content of the first DC.Subject
by using:
document.getElementsByName("DC.Description")[0].getAttribute("content"))
and the second by
document.getElementsByName("DC.Description")[1].getAttribute("content"))
But this is not language specific. However, how do I get the content of DC.Description
by using xml:lang=
in JavaScript?