<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Virtual Library</title>
</head>
<body>
<p>Moved to <a href="http://example.org/">example.org</a>.</p>
</body>
</html>
Content-Type
tag
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<HTML lang="en-GB">
En janvier, toutes les boutiques de Londres affichent des panneaux
<span lang="en-GB">SALE</span>, mais en fait ces magasins sont bien propres!
:lang(en) { color: red; }
will colour the English text red
According to the W3C FAQ: Setting language preferences in a browser
Internet Explorer: Tools > Internet Options > General > Languages
Firefox: Tools > Options > Advanced > Languages
Mozilla / Netscape Navigator: Edit > Preferences > Navigator > Languages
Opera: File > Preferences > Languages
IE Mac: Edit > Preferences > Web Browser > Language/Fonts
Safari: (Set via the Mac OS X system preferences) System preferences > International > Language
Galeon: Settings > Preferences > Rendering > Languages
Lynx: O (Options) > Headers Transferred to Remote Servers > Preferred document language
Amaya: Edit > Preferences > Browsing > List of preferred languages
This is text in a <p dir="rtl"> tag
This is text surrounded by Unicode RTL chars in a <p dir="rtl"> tag
@charset "ISO-8859-1";
body { display: block; margin: 15px 15px 15px 15px;}
p { display: block; margin-bottom: 10px;}
qo { display: inline;}
qo:before { content: open-quote; }
qo:after { content: close-quote; }
/* Locale-specific marks: */
[lang|='en'] > * { /* English */ quotes: "\201C" "\201D"; }
[lang|='fr'] > * { /*Fr(guillemets)*/ quotes:"\AB\A0" "\A0\BB"}
[lang|='fi'] > * { /*Finnish (same dir)*/ quotes:"\201D" "\201D"}
[lang|='de'] > * { /* German */ quotes: "\201E" "\201C" }
[lang|='ja'] > * { /* Japanese */ quotes: "\300C" "\300D" }
[lang|='nl'] > * { /* Dutch */ quotes: "\2018" "\2019" }
[lang|='pl'] > * { /* Polish */ quotes: "\201E" "\201D"
<style>
.list_heb { list-style-type: hebrew }
.list_geo { list-style-type: georgian }
.list_arm { list-style-type: armenian }
.list_cjk { list-style-type: cjk-ideographic }
</style>
List numbered in Hebrew: <ol class="list_heb"> <li>Item 1</li><li>Item 2</li><li>Item 3</li><li>Item 4</li> </ol>
List numbered in Georgian: <ol class="list_geo"> <li>Item 1</li><li>Item 2</li><li>Item 3</li><li>Item 4</li> </ol>
List numbered in Armenian: <ol class="list_arm"> <li>Item 1</li><li>Item 2</li><li>Item 3</li><li>Item 4</li> </ol>
List numbered in Han character
(cjk-ideographic
):
<ol class="list_cjk"> <li>Item 1</li><li>Item 2</li><li>Item 3</li><li>Item 4</li> </ol>
Date
object has a toLocaleString()
method
decimalSeparator = "."
moneySymbol = "\u20A0" // euro
dollars = 10
cents = 40
moneyStr = "" + dollars + decimalSeparator + cents + moneySymbol