[dojo-contributors] Dojo data discussion

Brian Douglas Skinner skinner at dojotoolkit.org
Thu Jun 7 16:21:17 EDT 2007

Adam L. Peller wrote:
> On 6/7/07, Brian Douglas Skinner <skinner at dojotoolkit.org> wrote:
>> In the case of an employee's name, then probably no localization would
>> be needed.  But in some other cases you might want localization.  For
>> example, if you've got a set of items that represent countries and
>> cities, those things might have different names in different languages.
> Then the countries and cities should return a key and we should look
> it up in a separate table.  We could use a resource bundle or another
> database for the localization resource.  I don't think we can solve
> the localization problem in our API.

Yup, I'm not advocating adding a bunch of 'locale' args in our dojo.data 
APIs.  Maybe we don't need to do anything at all in the dojo.data API. 
Isn't there some way for a JavaScript function to find out the language 
and country of the user's browser?  If so, then can't a datastore 
implementation just find the browser's language setting and return 
attribute values in that language?

When you're talking about a resource bundle or another database, are you 
saying that the UI code would look things up in that resource bundle or 
that the datastore code would look things up in that resource bundle?  I 
don't think the UI code should ever have to do that kind of lookup -- 
the UI code ought to be able to just ask the datastore for an attribute 
value and get back a value that it can display.  We also don't want to 
require that the entire resource bundle be loaded on the client.  And if 
the resource bundle is on the server, we don't want to require a second 
round trip to the server in order to get the attribute value.

:o) Brian

More information about the dojo-contributors mailing list