Syntax for specifying the language of a non-localized gadget

0 views
Skip to first unread message

fargo

unread,
May 2, 2008, 7:32:12 PM5/2/08
to OpenSocial and Gadgets Specification Discussion
Problem: Gadget consumers, and particularly directories, don't have a
good way of knowing what the language is of a gadget when it's not
localized (eg. using <Locale> and message bundle substitution). Even
when these constructs are used, there's no guarantee that localization
is performed completely. As gadgets spread far and wide, with many
being written with language hard-coded, this may result in a sub-
optimal search and discovery experience for end users.

Solution: Define some syntax allowing the developer to specify the
language in which they're developing.

Proposal: Add default_lang="..." attribute to <ModulePrefs>. Valid
values are ISO639-1 language codes per (http://code.google.com/apis/
opensocial/docs/0.7/reference/gadgets.Prefs.html). The attribute is
optional.

Thanks,
John

Kevin Brown

unread,
May 2, 2008, 9:16:26 PM5/2/08
to opensocial-an...@googlegroups.com
I really don't see how this gives any appreciable benefit over simply adding <Locale lang="fr"/> to indicate that the gadget is in french. Directories and similar facilities can inspect the gadget to determine what locales they support, and when they see "fr", they'll know the gadget supports french. Whether or not it's the "primary" language is irrelevant.

default_lang is also insufficient. ISO-639-1 does not discriminate between standard american and standard british english, or between traditional and simplified chinese. You have to include the country. If you're going to do that, you may as well fall back on the existing mechanism rather than adding a new mechanism which serves to confuse the issue.

John Hjelmstad

unread,
May 5, 2008, 9:29:13 PM5/5/08
to opensocial-an...@googlegroups.com
On Fri, May 2, 2008 at 6:16 PM, Kevin Brown <et...@google.com> wrote:
I really don't see how this gives any appreciable benefit over simply adding <Locale lang="fr"/> to indicate that the gadget is in french. Directories and similar facilities can inspect the gadget to determine what locales they support, and when they see "fr", they'll know the gadget supports french. Whether or not it's the "primary" language is irrelevant.

The assertion here is that a single, unique piece of syntax for this concept is preferable to <Locale lang="fr"/> because it's more self-documenting (minor point), unambiguous (<Locale lang="fr"/><Locale lang="de"/> -> in which is the gadget implemented?), and doesn't conflate what <Locale> is used for - to supply MessageBundle (and potentially other localized) content.

I don't think "primary" is the right word for this concept... "default" isn't especially great either. The question being answered is: "What language is there already?"
<Content type="html">
Hello, World!
</Content>
...vs...
<Content type="html">
Bonjour, Monde!
</Content>

 


default_lang is also insufficient. ISO-639-1 does not discriminate between standard american and standard british english, or between traditional and simplified chinese. You have to include the country. If you're going to do that, you may as well fall back on the existing mechanism rather than adding a new mechanism which serves to confuse the issue.

Interesting point. This would indeed suggest default_country="..." or the use of a different fully-qualified syntax (en_uk vs en_us), which is confusing. Neither of these is especially appealing.

What do you think? One way or the other there's no mention of this concept in the spec to date. If there's a preference for <Locale>-syntax, that's fine but we need to specify that instead.

--John
 
Reply all
Reply to author
Forward
0 new messages