chronotope / chrono-tz

TimeZone implementations for rust-chrono from the IANA database
Other
235 stars 56 forks source link

Internationalize time zone names (i.e. translate to other languages) #149

Closed Victor-N-Suadicani closed 6 months ago

Victor-N-Suadicani commented 6 months ago

Feature request: Add an interface that provides time zone names in other languages than English. Some inspiration is perhaps possible from https://github.com/mattjohnsonpint/TimeZoneNames

djc commented 6 months ago

I won't be able to work on this myself, but I would be open to reviewing a PR for this, assuming it doesn't add too much complexity. It would be good to more explicitly state the motivation for wanting this feature.

Victor-N-Suadicani commented 6 months ago

Motivation is display of time zones for user selection. I have a website that supports multiple languages and displaying the time zones only in English is a little jarring when the rest of the UI is in a different language.

djc commented 6 months ago

Yeah, not sure this crate is the right place for an integration like that -- the translation of the timezone names seems pretty much orthogonal to actually implementing the calculation of the timezone offset for a given timezone (using its canonical tzdb name).

pitdicker commented 6 months ago

I think we should keep this as an issue to solve for another crate. Internationalization is not easy, and a pretty different area from time zone calculations.

We would need a reliable source for the translation data, and that data must remain up to date with the time zones as defined by the IANA database.

pitdicker commented 6 months ago

The translation data should also be available under a free license. What https://github.com/mattjohnsonpint/TimeZoneNames uses is extracted from Windows and questionable.