Re: language-shift logical tag?

Michael Hamm wrote:

> Is there a logical tag to indicate that a word is in a different
> language? What I mean is shown in an example:
> 
> What Godfrey did not know was that a shield is the <tag>sine qua
> non</tag> of sparring. Thus, he died.

LANG [1] is the attribute for Language Codes in HTML 4.0 and can be
used with "All elements but APPLET, BASE, BASEFONT, BR, FRAME,
FRAMESET, HR, IFRAME, PARAM, SCRIPT" [2]. So you could do your example
in many different ways. Here are few. Say that you start the document: 

   <HTML lang="en"> or <BODY lang="en">

If appearance doesn't matter, here the English and Latin will display
in the same style and font: 

   What Godfrey did not know was that a shield is the 
   <span lang="la">sine qua non</span> of sparring.
   Thus, he died.

Here the English will be plain text, and the Latin will be emphasized:

   What Godfrey did not know was that a shield is the 
   <em lang="la">sine qua non</em> of sparring.
   Thus, he died.

Here the English will be plain text, and the Latin will be italic:

   What Godfrey did not know was that a shield is the 
   <i lang="la">sine qua non</i> of sparring.
   Thus, he died.

In the next two cases, the CLASS or ID "noten" (an arbitrary name here,
signifying "not English") could be set to display any way you like,
using CSS style (or if no style is specified or stylesheets are turned
off, the Latin will be in the same style and font as the English) [3]: 

   What Godfrey did not know was that a shield is the 
   <span class="noten" lang="la">sine qua non</span> of sparring.
   Thus, he died.

   What Godfrey did not know was that a shield is the 
   <span id="noten" lang="la">sine qua non</span> of sparring. 
   Thus, he died.

> Or, if there is no tag specifically for this, what should I use?
> Cite? Em?

Yes, CITE and EM accept the LANG attribute. For more help and ideas,
you might try the newsgroups comp.infosystems.www.authoring.html or
comp.infosystems.www.authoring.stylesheets. 

[1] http://www.w3.org/TR/REC-html40/struct/dirlang.html#h-8.1
[2] http://www.w3.org/TR/REC-html40/index/attributes.html
    (this page, just for reference, is a table and over 100k)
[3] http://www.macvirus.com//test/ie3/background-phrase.html
    (a minor CSS caveat about color on phrase elements)

-- 
Susan Lesch

Received on Sunday, 20 September 1998 19:14:13 UTC