Atributo de linguagem do sistema SVG
O atributo systemLanguage expressa uma lista de muitas tags de idioma com suporte.
Os elementos que usam este atributo incluem:
<a>, <altGlyph>, <animate>, <animateColor>, <animateMotion>, <animateTransform>, <audio>, <canvas>, <circle>, <clipPath>, < cursor>, <defs>, <discard>, <ellipse>, <foreignObject>, <g>, <iframe>, <image>, <line>, <mask>, <path>, <pattern>, <polygon> , <polyline>, <rect>, <set>, <svg>, <switch>, <text>, <textPath>, <tref>, <tspan>, <unknown>, <use> e <video>.
Sintaxe:
systemLanguage = "language-tags"
Valores de atributo: o atributo systemLanguage aceita os valores mencionados acima e descritos abaixo
- language-tags: Este valor de atributo inclui tags como: ar, de, nl, en-us, en-gb, en-au, en, es, fr, ja, ru, etc.
Os exemplos abaixo ilustram o uso do atributo systemLanguage.
Exemplo 1:
<!DOCTYPE html>
<html>
<body>
<h1 style="color: green;">
GeeksforGeeks
</h1>
<svg viewBox="0 -20 300 350">
<switch>
<text systemLanguage="ar">مرحبا</text>
<text systemLanguage="de, nl">Hallo!</text>
<text systemLanguage="en-us">Howdy!</text>
<text systemLanguage="en-gb">Wotcha!</text>
<text systemLanguage="en-au">G'day!</text>
<text systemLanguage="en">Hello!</text>
<text systemLanguage="es">Hola!</text>
<text>Sorry no language matched!</text>
</switch>
</svg>
</body>
</html>
Saída:
Exemplo 2:
<!DOCTYPE html>
<html>
<body>
<h1 style="color: green; text-align: center;">
GeeksforGeeks
</h1>
<svg viewBox="-30 -20 300 350">
<switch>
<text systemLanguage="ar">مرحبا</text>
<text systemLanguage="de, nl">Hallo!</text>
<text systemLanguage="es">Hola!</text>
<text>Sorry no language matched!</text>
</switch>
</svg>
</body>
</html>
Saída:
As postagens do blog Acervo Lima te ajudaram? Nos ajude a manter o blog no ar!
Faça uma doação para manter o blog funcionando.
70% das doações são no valor de R$ 5,00...
Diógenes Lima da Silva