draft-phillips-langtags-04 /2.4.2 Matching language tags

Peter Constable petercon at microsoft.com
Thu Jul 1 21:19:33 CEST 2004


> From: Tex Texin [mailto:tex at xencraft.com]

 

 

> If as you say, the documents' labels are to be truncated, and
different labels

> have specified different numbers of subtags, how much and exactly what
is

> truncated on each pass?

 

Whatever I said, it's easy to miscommunicate when talking about this
stuff. So, I'll restate my understanding: if a request is for "a-b",
then you look for documents that are tagged as "a-b" or "a-b-...". So,
you'd get matches as follows:

 

document    match

"a-b-c-d"   yes

"a-b-c"     yes

"a-b-e"     yes

"a-b"       yes

"a-f"       no

"a"         no

 

 

Applying that to your example, then you would get matches as follows:

 

Request       Document         Match 

zh-Hant-TW    zh-Hant-TW       yes

              zh-Hant-TW-foo   yes

              zh-Hans          no

              zh-TW            no

              zh-TW-foo        no

              zh               no

 

zh-TW         zh-Hant-TW       no

              zh-Hant-TW-foo   no

              zh-Hans          no

              zh-TW            yes

              zh-TW-foo        yes

              zh               no

 

 

 

Peter Constable

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://eikenes.alvestrand.no/pipermail/ietf-languages/attachments/20040701/6530bb1e/attachment-0001.htm


More information about the Ietf-languages mailing list