Export (0) Print
Expand All
end
src
src
URL
Expand Minimize

systemLanguage Attribute

This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.

Indicates whether a given language is selected in a user's system preferences.

Syntax

HTML <ELEMENT systemLanguage=sLang ... >
Scripting N/A

Possible Values

sLang A comma-delimited list of language names to check.

Remarks

The systemLanguage attribute evaluates to true if a language indicated by user preferences matches a language provided in this attribute value. It also evaluates to true if a language indicated by user preferences matches a prefix of the language provided in the value of this parameter, when the first tag character following the prefix is "–". The attribute evaluates to false otherwise.

For a list of available language codes, see the Language Codes reference. Note that the prefix described in the preceding paragraph provides more specific language designations. For example, en for English is a valid setting. The en-us setting is valid for English (United States); the en-nz setting is valid for English (New Zealand); and the en-ie setting is valid for English (Ireland).

This use of a prefix matching rule does not mean that users who understand a language with a certain tag will also understand the languages with that tag as a prefix. The prefix rule allows the use of prefix tags, if this is the case.

Multiple languages might be listed for content that is intended for multiple audiences. For example, a rendition of the "Treaty of Waitangi," presented simultaneously in the original Maori and English versions, would call for the following code.


<t:AUDIO src="fun.wav" systemLanguage="mi, en"/>

However, the presence of multiple languages in the object on which the systemLanguage attribute is placed does not mean that it is intended for multilingual audiences. An example is a beginner language primer, such as "A First Lesson in Latin," which is intended to be used by an English-literate audience. In this case, the systemLanguage test attribute should include only "en."

Note   If several alternative language objects are enclosed in a switch, and none of the objects matches, this might lead to situations such as a video that is shown with no audio track. At the end of the switch, you should include a catch-all choice that is acceptable in all cases.

If the systemLanguage attribute is used on an HTML element in a systemLanguage statement, you don't have to apply the time2 behavior to the HTML element.

Example

This example demonstrates that the following sentence, "This is an example for the systemLanguage property," appears in the language based on your current locale (language setting) in the General Tab in the Regional Options in Control Panel. The sentence is translated into three languages: Spanish (es), Portuguese (pt), and English (en).

To test this sample, switch your current locale (language setting) to Spanish, Portuguese, or English, and then refresh this Web page. If you choose any other language, a "Language not supported" message appears. Be sure to set your current locale back to its original setting.


<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<STYLE>
    .time{ behavior: url(#default#time2);}
</STYLE>
<?IMPORT namespace="t" implementation="#default#time2">
</HEAD>

<BODY>
<t:SWITCH>
    <SPAN systemLanguage="es" ><b>Your current locale setting is Espanol</b>.
        <BR><BR>Este es un ejemplo para el <b>systemLanguage</b> la propiedad.
    </SPAN>
    <SPAN systemLanguage="pt" ><b>Your current locale setting is
        Portuguese</b>.<BR><BR>Este e um exemplo para a <b>systemLanguage</b>
        propriedade.
    </SPAN>
    <SPAN systemLanguage="en" ><b>Your current locale setting is English</b>.
        <BR><BR>This is an example for the <b>systemLanguage</b> property.
    </SPAN>
    <SPAN>This language is not supported.</SPAN>
</t:SWITCH>
</BODY>
</HTML>

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/systemLanguage.htm

Applies To

t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:SEQ, t:SET, t:SWITCH, time2, t:VIDEO

See Also

Community Additions

ADD
Show:
© 2015 Microsoft