简体   繁体   English

多语言SVG中的`systemLanguage`属性到底是什么意思?

[英]What exactly does the `systemLanguage` attribute in multilingual SVG's refer to?

The SVG specs describe a systemLanguage attribute ( http://www.w3.org/TR/SVG/struct.html#SystemLanguageAttribute ) that can be used to provide multilingual content (for example when put in a switch that provides cases for different languages). SVG规范描述了一个systemLanguage属性( http://www.w3.org/TR/SVG/struct.html#SystemLanguageAttribute ),可用于提供多语言内容(例如,当放入提供不同语言案例的switch时) )。

But what exactly is meant with systemLanguage ? 但究竟是什么意思与systemLanguage Is it the language of the Browser? 它是浏览器的语言吗? The language of operating System? 操作系统的语言? The keyboard layout language? 键盘布局语言? The thing that PHP's $_SERVER['HTTP_ACCEPT_LANGUAGE'] contains? PHP的$_SERVER['HTTP_ACCEPT_LANGUAGE']包含的东西是什么? A parameter of the SVG file itself (like foo.svg?en-US )? SVG文件本身的参数(如foo.svg?en-US )? What "thing" can/should/may I change to actually trigger the element with matching systemLanguage attribute? 什么“东西”可以/应该/我可以更改为实际触发具有匹配systemLanguage属性的元素?

Background: I'm about to design a website that has a language switcher. 背景:我即将设计一个有语言切换器的网站。 This website will contain SVG images. 本网站将包含SVG图像。 And the SVG images will contain text. SVG图像将包含文本。 That's why I wonder about what the systemLanguage attribute evaluates exactly. 这就是为什么我想知道systemLanguage属性究竟是什么评估的原因。 Can I pass the language that is selected by the user of my website to the SVG file or does it only work if the user actually changes some Browser/OS language? 我可以将我的网站用户选择的语言传递给SVG文件,还是仅在用户实际更改某些浏览器/操作系统语言时才能使用?

Edit: Just found, on Wikimedia Commons there is an example, where one can actually change the language with a drop down box: https://commons.wikimedia.org/wiki/File:SystemLanguage.svg , but I can't figure out how the language is passed to the SVG file. 编辑:刚刚发现,在Wikimedia Commons上有一个例子,其中一个人可以通过下拉框实际改变语言: https//commons.wikimedia.org/wiki/FileSystemLanguage.svg ,但我无法想象如何将语言传递给SVG文件。

In Firefox it matches your preferred language or languages set via about:preferences#content then click on the Choose... button 在Firefox中,它匹配您首选的语言或通过about:preferences#content设置的语言,然后单击Choose ...按钮

语言选择对话

Chrome has a similar mechanism as do other UAs. Chrome具有与其他UA类似的机制。

Mediawiki are are displaying a png on that page, they display a different png if you select a different language in the dropdown. Mediawiki正在该页面上显示一个png,如果您在下拉列表中选择其他语言,它们会显示不同的png。 If you click on the png you go to a page with an actual svg file that you can change by changing your UA language. 如果单击png,则转到包含实际svg文件的页面,您可以通过更改UA语言来更改该文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM