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).
But what exactly is meant with 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? A parameter of the SVG file itself (like foo.svg?en-US)? What "thing" can/should/may I change to actually trigger the element with matching systemLanguage attribute?
Background:
I'm about to design a website that has a language switcher. This website will contain SVG images. And the SVG images will contain text. That's why I wonder about what the systemLanguage attribute evaluates exactly. 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?
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.
In Firefox it matches your preferred language or languages set via about:preferences#content then click on the Choose... button
Chrome has a similar mechanism as do other UAs.
Mediawiki are are displaying a png on that page, they display a different png if you select a different language in the dropdown. 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.
Related
Does anyone know if you can change the color of the text for specific items in a dropdown list in Adobe's extendscript ScriptUI? I know about the color section of the Script UI guide, however that says nothing about list items and I tried a few things by chance but wasn't able to find a solution.
The ScriptUI is converted to HTML5/CSS behind the scenes. Because the CSS is not exposed to the user, it is not possible to change any of the colour schemes.
You can use images for buttons to add colour to them, but that wouldn't apply to dropdowns.
I'm not certain about the other Adobe programs, but I know that creating an extension (as opposed to a script) for After Effects is a way of circumventing this restriction.
I'm creating a webpage using markdown hosted by github.io. I really don't like the blue color of the hyperlink automatically generated by markdown and I'm wondering if it's possible to change it. More specifically, I'd like the text to stay black and the solid underline to become dashed underline. Here is a sample code:
Support static-based commenting via [Staticman](https://staticman.net/) for sites hosted with GitHub Pages. [#424](https://github.com/mmistakes/minimal-mistakes/issues/424)
I heard github markdown is different from traditional markdown, but I've seen people changed the link color and underline type with the same website template so I think it's still possible to change. Any suggestions?
Since GitHub uses its own styling after it processes your markdown file, any custom stylings will be overwritten. However, in a broader case, you can always use HTML elements in your markdown files. Take this example:
[normal link](https://www.google.com/)
custom link
The first one will appear as a normal blue link which will be underlined when you hover your mouse over it. The second one is a link that matches your requirements for black color and dotted underline.
I tested it on my local machine and it renders just fine in VSCode, but all styling is lost when I put it on GitHub.
Though, since you're going for a webpage, I really recommend going for HTML and CSS. They're really easy if you know MD and are much much more customizable.
An SVG file can contain text in multiple languages (to be shown alternatively), using the systemLanguage attribute inside a <switch> element. See for example:
the explanation on MDN
the Multilingual SVG example.svg on Wikimedia Commons*
What exactly does the `systemLanguage` attribute in multilingual SVG's refer to?
This is very handy for displaying diagrams on a multi-lingual website: I can just include the image using the <img> tag, and the browser will automatically show the text in the right language, based on the language chosen in the browser settings.
However, generally relying on browser settings alone is not good, because the user might want to see the site in a different language, and requiring them to fumble with settings is not practical. So most sites offer a way to switch the display language. For example:
on MDN there is a "Language" button at the top of the page
the Debian website has links in the footer ("This page is also available in the following languages")
If I want to offer this type of language switching, how do I switch the display language of a multi-language SVG file? I found no HTML tag, DOM API or similar that would allow changing the display language chosen by the browser.
Or will I have to do this server-side? This is obviously possible, but rather inelegant.
The problem was also noticed by the Wikimedia project - see T60920 - lang support for SVG images using SystemLanguageAttribute ill-defined and not properly supported in browsers.
tl;dr: When displaying a multi-language SVG (using systemLanguage) in a browser, can I influence the SVG's display language without messing with the SVG file itself?
If you do not want to rely on the browser (as you said) you need to render the image anyway as png (for every language) and embedd it as PNG, as Wikipedia/Wikimedia does it. Expecially multilingual files are not fully supported by browsers and might render differently (between Chrome and Firefox and Internet Explorer ,...)
But if you want to embedd a SVG in a specific language, it does not make any sence to embedd it as multilingual file.
I've been pretty impressed with Katex's performance. It seems like a good fit as a rendering engine for a WYSIWIG latex editor. However, with MathJax, I can easily inject HTML/CSS in arbitrary locations using the \class directive. I can then use these injected classes for blinking cursors, gray boxes, and what not. For example:
Is there a way to do the same thing with Katex? In particular, I need the ability to inject HTML/CSS in arbitrary locations in the equation.
This is not currently supported. There is an open issue on the Github page.
I wonder if there a way to save text direction default- right to left (RTL) or vise versa (left to right-LTR) in different web pages. So when i open specific web site the text direction will be automatically LTR or RTL. I use google chrome so i tried to search in the properties and didn't find any option to save text direction default. I red change text direction of textbox automatically and How can I automatically set text direction based on input text language? and other questions and search in my windows xp Language preference but didn't find what i'm looking for.
Thanks in advance for any help.
UPDATE:
I'm using a program called "Lang Over 5" that changed text orientation using "F10" button. But i can't save default text orientation in web sites with it.
It likely cannot be done for different webpages/sites unless someone has created an add-on module that I'm unaware of. Here are two options that you can do, however:
1) Use two different browsers, set each to the proper language settings that you want.
2) If you are set on using Chrome for both, you may be able to run multiple instances as is shown here: http://blog.buddywork.com/post/15839021578/how-to-run-multiple-instances-of-chrome