Internationalization: Strings as locales argument

Phillips, Addison addison at lab126.com
Sat Jul 14 13:49:08 PDT 2012


> 
> The result would be that "" is rejected with a RangeError, but "en-US" is
> processed as ["en-US"].
> 

Would there be some means of referencing the "root" locale other than using the empty string?

Also, one means of assigning a locale would be to scrape one or another @lang attribute in some HTML or XML content. If that attribute were empty, would RangeError be an expected outcome? Wouldn't it be better to handle the empty string gracefully, since it isn't necessarily an error condition?

Addison


More information about the es-discuss mailing list