On Friday, April 7, 2017 at 11:22:17 AM UTC+12, zbran...@mozilla.com wrote:
> Hi all,
> 
> We completed the transition of the Intl handling from using OS locale, to use 
> browser UI locale.
> 
> We have a new API called mozIntl.DateTimeFormat which should be the primary 
> way we format date and time in our chrome.
> You can think of it as a regular ECMA402 DateTimeFormat on steroids.
> 
> It gives us two "shorthand" options "dateStyle" and "timeStyle" which you can 
> use instead of listing manually all options. This should lead to increased 
> consistency of our UI. On top of that, those two options allow us to tap into 
> OS regional settings to read any manual adjustments user made and respect 
> them.
> 
> Imagine that the user changed time format from hour12 to hour24. 
> mozIntl.DateTimeFormat will respect that and show the time in the current UI 
> locale, but with this adjustment.
> 
> This step is crucial for better product localizability (because now the dates 
> are in the same language as the rest of UI - think "Today is: April 5th" 
> where "April 5th" comes from date formatting and "Today is:" from l10n - we 
> want both to be in one language).
> 
> Example of how to use the new API:
> 
> ```
> 
> let dtf = mozIntl.createDateTimeFormat(undefined, {
>   dateStyle: 'long', // full | long | medium | short
>   timeStyle: 'medium // full | long | medium | short
> });
> 
> dtf.format(now);
> 
> ```
> 
> Please, use the new API for all new code and when possible, migrate old code 
> to use it.
> 
> Thanks!
> zb.

"from using OS locale, to use browser UI locale."

How is the browser UI locale set/chosen? If based on OS locale settings, great!

However, if based on (I guess) downloaded version:

Does that mean that Firefox will now ignore *my* preferred OS-wide settings? 
(e.g.: 24h clock, YYYY-MM-DD dates.)
And date/time displays would be inconsistent with the date&time in my OS task 
bar and most other software.

I would understand if Firefox offered a way to override that (which would be 
useful for testing IIUC), but making it the default seems disrespectful of our 
users.

Regards
Gerald
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to