Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

l20n Date Time localization

50 views
Skip to first unread message

Александр Радченко

unread,
Feb 24, 2016, 3:35:47 AM2/24/16
to mozilla-t...@lists.mozilla.org
Hello,

I very exited by http://l20n.org/ and have some questions about not string localization.

How it can support date, time, numbers, currency and other localization?

For example numbers can be integer or float, they can have different point separator, they can have thousand separator.
They can have different formats, like scientific format, % format and so on.
Also physical measurement is different for example temperature can be in Celsius or in Fahrenheit and so on.

Date and time can have different formats. To support date and time localization it will be useful to get date and time parts and so on.

Should l20n support date and time localization and what functions should be added to it?

zbran...@mozilla.com

unread,
Mar 30, 2016, 5:31:40 PM3/30/16
to mozilla-t...@lists.mozilla.org
Hi Aleksandr!

We're working on a syntax for l20n (dubbed FTL) that has pretty strong ties to Intl API (based on ICU and Ecma 402).

With it, you will be able to do things like:

// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat
NUMBER($num, style="currency")

or:

// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
DATE($date, month="long", day="2-digit", year="numeric")

And then we are also working on follow up formatters like: ListFormat, UnitFormat, DurationFormat and RelativeTimeFormat that you will be able to reference similarly from within localization.

Let me know if it sounds like something that will help your case!

Thanks,
zb.
0 new messages