Olivier Sirven wrote:
> Daniel Veditz a �crit:
> 
>>I don't think there's currently a way to get the locale inside an install
>>script. You could set up your site to guess the locale (from the user
>>agent?) and pass it in as an argument
> 
> 
> Too bad :(
> Anyway, thank you for your help ;)
> 

Originally the loadResources command was supposed to guess at the users
locale and try to open the appropriate version of the properties file. That
is, assuming the user is running with locale xx-YY and wants to load
foo.properties, we try in order
   foo.xx-YY.properties
   foo.xx.properties
   foo.properties

Or alternately, instead of stopping at the first found one, open them in the
opposite order and overwrite the generic terms with the more locale-specific
ones if found.

But we never implemented that... First, the locale isn't available during
the initial install so it would only apply to extensions installed while
Mozilla was running, and at the time we had people with the time to work on
this there weren't any add-ons to install. Second, there wasn't much UI
possible from an install script (we really tried to minimize it, so multiple
packages would easily combine together) and what really mattered was the
locale of the install extension instead. Anyone providing multiple
localizations inside their package (rare) could simply install all of them
and let the appropriate one be chosen by the chrome registry.

What would your script do differently if you knew the user's locale?

-Dan Veditz
_______________________________________________
Mozilla-xpinstall mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpinstall

Reply via email to