- From: Gregory J. Rosmaita <unagi69@concentric.net>
- Date: Tue, 02 Nov 1999 12:06:00 -0500
- To: "Chris Ridpath" <chris.ridpath@utoronto.ca>
- Cc: Evaluation & Repair Interest Group <w3c-wai-er-ig@w3.org>
Chris asked: >An author can identify changes in language for an entire paragraph or DIV >but how can they identify language changes for a word or phrase within a >paragraph or DIV? aloha, chris! yes, there is a very simple way to do this -- use the SPAN element and the LANG attribute... if, for example, i were to encode a portion of Daniel's response to you, i'd mark it up thus, whether or not the natural language definition for the page was declared in the HTML element using the LANG attribute: --- begin example <p>Whilst Daniel wrote, <Q>No, <span lang="fr">ça n'est pas possible.</span></Q>, I say, <Q lang="fr">au contraire, mon ami!</Q></p> --- end example note that i used the Q element to demarcate my response as French, but that i used the SPAN element to demarcate the French portion of his response, as he used the English form of "no" (plus, i was trying to prove a point!) i use the SPAN element to demarcate the latinisms that litter my personal site, --- begin second example <p class="banner">Welcome to <span lang="la">Camera Obscura</span>, the womb without a view...</p> --- end second example as well as when using the occasional foreign phrases or terms in the text of a document --- begin third example Thus, Jimmy Carter learned the importance of practicing <span lang="de">realpolitik</span>, without actually appearing to have compromised his oft-articulated principled stance. --- end third example unfortunately, on-the-fly translation services ignore the LANG declarations contained in SPAN elements, but, then again, they're not particularly strong on recognizing the LANG attribute in any element... Chris also observed: quote FONT has a LANG attribute but it's not really appropriate. unquote no, it is not, but the use of SPAN to demarcate that the word or phrase it contains is in another language (even if there is no LANG declaration in the HTML element) is valid HTML... moreover, use of <SPAN LANG=""> </SPAN> is an authoring strategy that can be employed when one uses shared unicode characters -- such as the ideograms that are shared by Chinese, Japanese, and Korean, and which would otherwise be indistinguishable to a user agent -- to denote in which linguistic sense they are being used.... as for Chris' last question: quote Does the author need to identify language changes for a word or phrase? unquote i would say, most definitely yes, as it is one way for an on-the-fly translation program to leave the foreign word or phrase intact (or to apply a different translational rule base to it) and it is one way to demarcate how one is using a Unicode character slash glyph slash ideogram that is used by multiple languages, but which has a distinct meaning in each... as for my justification for pushing for the use of SPAN, please refer to the HTML4 Rec, in particular, the table of attributes <http://www.w3.org/TR/REC-html40/index/attributes.html> which states that it is permissible to use the LANG attribute in all elements but APPLET, BASE, BASEFONT, BR, FRAME, FRAMESET, HR, IFRAME, PARAM, and SCRIPT; and the definition of the LANG attribute, located at: <http://www.w3.org/TR/REC-html4/struct/dirlang.html#adef-lang> gregory. PS: hope this doesn't reach you too late, as i've just gotten back online after a four-and-a-half day hiatus -------------------------------------------------------- He that lives on Hope, dies farting -- Benjamin Franklin, Poor Richard's Almanack, 1763 -------------------------------------------------------- Gregory J. Rosmaita <unagi69@concentric.net> WebMaster and Minister of Propaganda, VICUG NYC <http://www.hicom.net/~oedipus/vicug/index.html> --------------------------------------------------------
Received on Tuesday, 2 November 1999 11:59:42 UTC