xml:lang attribute specifies the primary language used in contents and attributes containing text content of particular elements.
It is a universal attribute allowed in all XML dialects to mark up the natural human language that an element contains.
There is also a
lang attribute (without namespace). If both of them are defined, the one with namespace is used and the one without is ignored.
You can use this attribute with any SVG element.
<svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <text xml:lang="en-US">This is some English text</text> </svg>
This value specifies the language used for the element. The syntax of this value is defined in RFC 5646: Tags for Identifying Languages (also known as BCP 47).
The most common syntax is a value formed by a lowercase two-character part for the language and an uppercase two-character part for the region or country, separated by a minus sign, e.g.
en-USfor US English or
de-ATfor Austrian German.
|Scalable Vector Graphics (SVG) 1.1 (Second Edition) |
BCD tables only load in the browser