Bug 1643536 Comment 9 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to MarjaE from comment #7)
> Here's one: http://www.digitalattic.org/home/war/vegetius/
> 
> View Page Info shows content-language English.

This page ends up with the Other Writing Systems font preference because it does not have a `lang=en` (or equivalent) attribute.

Here's the beginning of the document, from View Source:
```
<!-- HEADER -->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
   
<head>
<title>The Military Institutions of the Romans (De Re Militari)</title>

<meta http-equiv="content-Type" content="text/html;charset=utf-8">
<meta http-equiv="content-Language" content="English">

<meta name="author" content="Mads Brevik">
<meta name="Robots" content="all">

<meta name="description" content="'De Re Militari' by Flavius Vegetius Renatus">
<meta name="keywords" content="flavius vegetius renatus, de re militari">

<link href="/favicon.ico" rel="shortcut icon">
<link href="/home/_include/attic.css" type="text/css" rel="stylesheet">

</head>

<!-- BODY -->

<body>

<div class="Body">
<div id="Mainmenu">

	<div class="MainTitle">
		<a href="/" style="color: black">Digital Attic</a>
	</div>

	<div class="TopMenuLink">
		<a href="/home/read/asoiaf/">A Song of Ice and Fire</a>&nbsp;:&nbsp;<a href="/home/war/">Warfare</a>
	</div>

</div>```

Note the absence of any `lang` attribute. What Page Info shows (content-Language: English) is not a language tag (`lang` attribute) but a `meta` tag, which (despite its name) is not the correct way to declare the language of the document itself; see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Language; its purpose is slightly different.

In addition, even if this *were* the relevant place to declare the document language, it wouldn't work as intended because it literally says "English" as the value (which Page Info dutifully shows); but the value is supposed to be a formally-defined language *tag* such as "en-US" that can be parsed in a well-defined way for processing. The string "English" is not a defined language tag and so would be ignored anyway.

So to sum up: the page does not declare its document language because of two authoring errors: trying to use an arbitrary language *name* rather than a well-formed language *tag*, and putting it in the `http-equiv="content-Language"` meta tag rather than as an HTML `lang` attribute. As a result, Firefox ends up using the Other Writing Systems font preference to resolve `sans-serif` for this content.
(In reply to MarjaE from comment #7)
> Here's one: http://www.digitalattic.org/home/war/vegetius/
> 
> View Page Info shows content-language English.

This page ends up with the Other Writing Systems font preference because it does not have a `lang=en` (or equivalent) attribute.

Here's the beginning of the document, from View Source:
```
<!-- HEADER -->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
   
<head>
<title>The Military Institutions of the Romans (De Re Militari)</title>

<meta http-equiv="content-Type" content="text/html;charset=utf-8">
<meta http-equiv="content-Language" content="English">

<meta name="author" content="Mads Brevik">
<meta name="Robots" content="all">

<meta name="description" content="'De Re Militari' by Flavius Vegetius Renatus">
<meta name="keywords" content="flavius vegetius renatus, de re militari">

<link href="/favicon.ico" rel="shortcut icon">
<link href="/home/_include/attic.css" type="text/css" rel="stylesheet">

</head>

<!-- BODY -->

<body>

<div class="Body">
<div id="Mainmenu">

	<div class="MainTitle">
		<a href="/" style="color: black">Digital Attic</a>
	</div>

	<div class="TopMenuLink">
		<a href="/home/read/asoiaf/">A Song of Ice and Fire</a>&nbsp;:&nbsp;<a href="/home/war/">Warfare</a>
	</div>

</div>
```

Note the absence of any `lang` attribute. What Page Info shows (content-Language: English) is not a language tag (`lang` attribute) but a `meta` tag, which (despite its name) is not the correct way to declare the language of the document itself; see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Language; its purpose is slightly different.

In addition, even if this *were* the relevant place to declare the document language, it wouldn't work as intended because it literally says "English" as the value (which Page Info dutifully shows); but the value is supposed to be a formally-defined language *tag* such as "en-US" that can be parsed in a well-defined way for processing. The string "English" is not a defined language tag and so would be ignored anyway.

So to sum up: the page does not declare its document language because of two authoring errors: trying to use an arbitrary language *name* rather than a well-formed language *tag*, and putting it in the `http-equiv="content-Language"` meta tag rather than as an HTML `lang` attribute. As a result, Firefox ends up using the Other Writing Systems font preference to resolve `sans-serif` for this content.

Back to Bug 1643536 Comment 9