获取所有荷兰时区

huangapple go评论71阅读模式
英文:

Get all timezones in Dutch

问题

我想获取荷兰语的所有时区列表。
我第一次尝试使用ZoneId.getAvailableZoneIds()。然而,这返回了一个英文列表。

根据这里提供的答案:https://stackoverflow.com/questions/47070956/localized-name-of-zoneids-id,我得到了一个荷兰语的时区列表,但并非所有时区都被翻译,翻译质量也不是很好,我甚至找不到荷兰/阿姆斯特丹时区。

有没有其他方法可以做到这一点?也许有我不知道的不同库?

英文:

I would like to get a list of all timezones in Dutch.
My first attempt was ZoneId.getAvailableZoneIds(). This however returned a list in English.

Using the answer as provided here: https://stackoverflow.com/questions/47070956/localized-name-of-zoneids-id provided me with a list of timezones in Dutch, but not all are translated, the translation isn't great, and I can't even find the Dutch/Amsterdam time zone in there.

Is there any other way to do this? Maybe a different library I don't know?

答案1

得分: 1

这里有一个开源代码,你可以在这里找到:https://github.com/graphhopper/timezone。不幸的是,他们尚未将其推送到Maven Central,因此您无法在您的pom.xml中导入它。您可以:

  1. 尝试将其推送到Maven Central(这是相当自动化的过程)。
  2. git clone 这个源代码,然后使用Maven构建/打包,以便您的.m2存储库会在本地包含它。
    然后在您的实际项目中使用它,就像将其导入您的pom.xml中一样。
英文:

There is an open-source code you can find here.
Unfortunately, they haven't pushed this to Maven Central so that you could import that in your pom.xml
You can

  1. Try to push it to maven central (quite automated processes).
  2. git clone that source and maven build/package such that your .m2 repo will contain that in your local .m2 repo.
    And then use that in your real project, like importing it into your pom.xml.

huangapple
  • 本文由 发表于 2020年10月7日 19:57:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/64243536.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定