英文:
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
中导入它。您可以:
- 尝试将其推送到Maven Central(这是相当自动化的过程)。
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
- Try to push it to maven central (quite automated processes).
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 yourpom.xml
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论