Subject: Re: Language support for scope enumeration

From: Mark Handley <[email-masked]>
Date: Fri, 09 Oct 1998 16:30:07 -0400

>> > Do we want to *require* a language tag for each scope name? 
>> 
>> In the discussion between Pavlin, Mark, and I, one of them
>> stated that sometimes you cannot render a name unless you know
>> the language, and hence requiring a language tag may be 
>> required.
>
>Since we are using Unicode, I expect that this situation would arise rarely. 
>Does anyone have a specific example?

My recollection is that this is an issue with some far eastern
languages.  I'm not an expert on this, but I heard that although
Chinese and Japanese share Kanji and the unicode for them, you can't
decide how to render them correctly unless you know which language
it's in.

Perhaps someone with more experience of this can correct me if I got
this wrong.

I guess another example would be if you wanted to put the name through
a text-to-speech system such as the one Jeremy Hall uses.  Different
languages that are all using the same western european characters
pronounce those characters differently.  You need to know which
language it is to even get close to the correct pronunication (let
alone accents :-).

Cheers,
	Mark

---

From: Steve Hanna <[email-masked]>
Date: Fri, 9 Oct 1998 16:23:27 -0400 (EDT)

> > It might be hard to force the user to enter one. 
> 
> It would require the abstract API caller to have one.  If it can't make 
> the user enter one, then it would need to choose one itself somehow.

I don't think the abstract API is involved here. The question is: can we force 
the person configuring scope names to enter a language tag?

> > > * Each scope may have at most one name per language
> > >   (multiples signal a config error).
> > 
> > It might be useful to have more than one name per language. For instance, a 
> > scope might be named "Company-wide", "IBM", and "International Business 
> > Machines" (all with the language tag "en").
> 
> This is a tradeoff.  We decided that we preferred the greater
> ability to diagnose misconfigurations which you gained by
> forcing only one name.  However, this is something which
> people can provide input on.
> 
> You have to understand that if you allow multiples, then
> you can't detect collisions (one router says it's the "IBM" scope
> and another says it's the "Sun" scope).  It also complicates the
> abstract API, since a client wanting to enumerate scopes in
> a particular language wouldn't get one name per scope.
> 
> I still prefer one name per scope (for the above reasons).
> More comments on this topic would be appreciated.

I'm not sure that it's desirable for a client that requests a scope list in a 
given language to always get one name per scope. In addition to the example I 
presented above, here's another one. Assume you have a scope with two names: 
("en-US", "Harbor") and ("en-UK", "Harbour"). If the client requests names with 
the language tag "en", which one do you return? If you say "the default," what 
if the default has language tag "fr"?

What if the scope has one name: ("en", "Harbor") and the client requested 
"en-UK"? If you say "the default," what if the default has language tag "fr"? 
Overall, I think it is best to provide a simple algorithm for the MAAS to use 
and a way for the client to get a complete list if it wants to do something 
fancy. If this complicates the API a bit, I don't mind. It can be a separate 
entrypoint if you like.

> > > * MZAP message may also label a specific (language tag, scope name) 
> > >   pair as the "default name" to display if none matches your 
> > >   desired language.  Since you have the actual language tag, 
> > >   you can tell how to render the default name.
> > 
> > I assume this would also apply if you don't know which language (or 
languages)
> > the user wants.
> 
> No, the main case targetted is one where you know which language
> the user wants (e.g. "Klingon"), but there's no scope name in that 
> language.  So the MAAS passes back the default name in the enumerate
> scopes api.

There are cases where you don't know which language the user wants (they haven't 
set their locale, etc.).

BTW, how do you plan to indicate which name is the default name?

> > What if the user can speak two languages? Do you pass in two languages (like 
> > "en, fr")? And what if none of the language tags match exactly (user 
> > specifies 
> > "en", only choice is "en-US")? And what if you have many users who speak 
many 
> > different languages?
> 
> Typically people configure their machine with a specific language
> (in today's OS's).  If you wanted to write a tool which is tailored
> for bilingual people, then I would expect that this tool would use
> the abstract API by calling enumerate scopes twice, once for each
> language, and then combining the results it gets.

Some OS's are multiuser. For these OS's, it might be most efficient to fetch all 
the scope names and match them to the user preferences at the OS level.

Also, some OS's may have more sophisticated language matching features than we 
would want to require in MAAS's. Again, I think it would be best to have a way 
to get all the names for a scope from an MAAS.

> > I'm somewhat reluctant to make the MAAS responsible for deciding which 
> > names to return. 
> 
> Agree.  The proposal was that the client specify the language
> in the enumerate scopes request.

But the MAAS must do some comparison between the language requested and the 
languages available. At the least, it must do a case-insensitive comparison. But 
this doesn't handle the case where the user specifies "en" and the only choices 
are "en-US" and "fr" (the default). Either the MAAS has to do something fancy or 
the user will never see the "en-US" name. If the client could request all names, 
it could have some fancy language tag matching code.

The API and client-MAAS protocol shouldn't get in our way and make the client 
play a guessing game. Nor should they require that the MAAS include fancy 
language tag matching code. There should be a simple, reasonable default and a 
simple workaround to fetch all names for a scope.

-Steve

P.S. I think this is a fine feature. However, the devil is in the details.

---

From: Dave Thaler <[email-masked]>
Date: Fri, 9 Oct 1998 18:02:00 -0400 (EDT)

> Assume you have a scope with two names: 
> the language tag "en", which one do you return? If you say "the default," 
> what if the default has language tag "fr"?
> 

I'm sure (from your previous comments) you might classify the following
as "fancy language tag matching code".  In my opinion, however,
it's simpler and more powerful in terms of misconfiguration detection 
ability to specify two rules for MAAS's:
   A request for "foo-bar" matches "foo" if "foo-bar" does not exist.
   A request for "foo" may match any "foo-bar" (pick one arbitrarily)
I'm not adamant about the above, but it appears to me to provide the
best advantage-to-disadvantage tradeoff.

> BTW, how do you plan to indicate which name is the default name?

In MZAP messages?  A bit per name is my strawman.

> Again, I think it would be best to have a way 

I would have no objection to adding another entry point to the 
abstract api, as you suggested, if that's what the WG consensus is.

-Dave