By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,492 Members | 1,955 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,492 IT Pros & Developers. It's quick & easy.

<q> element, quotes property, Russian

P: n/a
I've been able to get the <qelement and the CSS quotes property to
work well together in English, but not in Russian or mixed Russian and
English. I probably don't have a firm enough grasp of the CSS syntax
possibilities. This is exacerbated by the fact that I code in XHTML
1.1, where the <langproperty is not allowed (the xml:lang property
is used instead). My XHTML 1.1 pages contain both English and Russian
strings.

For Russian, I'm trying for
outside quotation marks 00AB and 00BB
and
nested (inside) quotation marks 201A and 2018

Can anyone suggest the proper coding for this? Many thanks.

Hank Moss

May 2 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Scripsit Hank Moss:
I've been able to get the <qelement and the CSS quotes property to
work well together in English,
I'm afraid that's impossible, in the WWW context. Given the fact that IE 6
does not support <qat all and even IE 7 doesn't support the quotes
property, any page relying on them would work in a minority of browsing
situations only (maybe 10 %, maybe even 20 %, but still _far_ less than
"working" in the WWW sense).

The only practical choice is to write quotation marks as document content.
This is as natural as it is to use other punctuation marks. We don't write
<question>What</question>
but
What?
so why should we use <q>...</q(even if it worked) instead of inserting the
quotation marks that are correct for the language used?
but not in Russian or mixed Russian and
English. I probably don't have a firm enough grasp of the CSS syntax
possibilities.
That's hard to guess, in the absence of a URL. But the correctness of coding
wouldn't change the WWW situation.
This is exacerbated by the fact that I code in XHTML
1.1, where the <langproperty is not allowed (the xml:lang property
is used instead).
XHTML 1.1 is an exercise in futility: there is no benefit from using it on
the WWW, and in other contexts, you would not use XHTML 1.1 but some XML
with varying tag sets (tag sallad, anyone?), including some tags from the
XHTML namespace. On the other hand, XHTML 1.1 has pointless changes and
restrictions as compared with XHTML 1.0, and it _should not_ be served as
text/html, and if you obey this rule, your document will not be displayed
_at all_ by IE.
My XHTML 1.1 pages contain both English and Russian
strings.
The quotation marks should be selected according to the language of the text
that encloses a quotation, not the language of quoted text. I mention this
because there seems to be much confusion around this.
For Russian, I'm trying for
outside quotation marks 00AB and 00BB
and
nested (inside) quotation marks 201A and 2018
In principle, you would write

:lang(en) { quotes: "\201c" "\201d" "\2018" "\2019"; }
:lang(ru) { quotes: "\ab" "\bb" "\201a" "\2018"; }

(I'm not taking a position on the correctness of this choice of quotation
marks. I'm a bit allergic to such issues, since there is so much wrong
information on the use of quotes, especially in nested quotations, and so
little solid ground consisting of authoritative specifications.)

On Firefox 2, this works whether you use lang or xml:lang (or both). On IE,
as said, it does not work at all. (IE 7 recognizes the selector [lang="ru"],
but this has narrower scope than :lang(ru), since it only applies to
elements with the attribute lang="ru" explicitly set. Moreover, IE 7 does
not let you add quotation marks, though it lets you e.g. set the color or
font of elements by their lang (not xml:lang) attributes.

For further confusion, if you set lang="ru", Firefox will default the font
family to whatever has been set in the browser settings as the default for
Cyrillic text (even if you in fact use Russian in Latin letters, using some
transliteration). It does not treat xml:lang="ru" the same way.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

May 3 '07 #2

P: n/a
Scripsit Jukka K. Korpela:
In principle, you would write
>lang(en) { quotes: "\201c" "\201d" "\2018" "\2019"; }
lang(ru) { quotes: "\ab" "\bb" "\201a" "\2018"; }
It seems that at least my copy of Outlook Express changed the colon ":" at
the start of a line to the greater than sign ">", interpreted as quotation
indicator. Please excuse me while I sit in the fridge for some time. Now,
here's a new try, with leading spaces added:

:lang(en) { quotes: "\201c" "\201d" "\2018" "\2019"; }
:lang(ru) { quotes: "\ab" "\bb" "\201a" "\2018"; }

Just in case that fails too, on some newsreaders, here's a version with the
universal selector "*", which does not change the meaning except eventually
for specificity:

*:lang(en) { quotes: "\201c" "\201d" "\2018" "\2019"; }
*:lang(ru) { quotes: "\ab" "\bb" "\201a" "\2018"; }

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

May 3 '07 #3

P: n/a
On Thu, 3 May 2007, Jukka K. Korpela wrote:
In principle, you would write

:lang(en) { quotes: "\201c" "\201d" "\2018" "\2019"; }
:lang(ru) { quotes: "\ab" "\bb" "\201a" "\2018"; }
Looks fine here.

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell
May 3 '07 #4

P: n/a
On Wed, 2 May 2007, Hank Moss wrote:
This is exacerbated by the fact that I code in XHTML
1.1, where the <langproperty is not allowed (the xml:lang property
is used instead).
Then use XHTML 1.0 - or better HTML 4.01.
For what do you need XHTML 1.1?
My XHTML 1.1 pages contain both English and Russian strings.
With HTML 4, you can use the LANG attribute (lang=en, lang=ru)
and the Mozilla/Firefox browsers will show the corresponding
text in the reader's preferred Latin and Cyrillic typefaces.
http://www.unics.uni-hannover.de/nht...-attribute.htm

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell
May 3 '07 #5

P: n/a
On Thu, 3 May 2007, Jukka K. Korpela wrote:
On the other hand, XHTML 1.1 has pointless changes and restrictions
as compared with XHTML 1.0, and it _should not_ be served as text/html, and if
you obey this rule, your document will not be displayed _at all_ by IE.
As long as you still name your files *.html , IE 6 will ignore the
Content-Type and display them as ordinary HTML.

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell
May 3 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.