良好的 Java 本地化框架

发布于 2024-12-22 06:12:15 字数 1536 浏览 9 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

℡寂寞咖啡 2024-12-29 06:12:15

您是否正在寻找本地化框架或具有本地化功能的 Web 框架?

如果您的情况是第二种,除了复数支持之外,Apache Tapestry 是一个不错的选择。 :)

http://tapestry.apache.org

Are you looking for a l10n framework or a web-framework with l10n features?

If your case is the second one, except for the Plurals support, Apache Tapestry it's a wonderful choice. :)

http://tapestry.apache.org

弃爱 2024-12-29 06:12:15

看看 ICU4J。
特别是像 MessageFormat、PluralFormat、SelectFormat 这样的东西来处理消息,并且还可以处理日期/时间/数字/货币格式。或者直接使用各种格式化程序(DateFormat、NumberFormat等)
Java 中的 ChoiceFormat 也值得一看。

但总的来说,资源包机制与 MessageFormat 相结合几乎总是足够的(看看 ICU4J 中的 UResourceBundle,比 Java ResourceBundle 更强大)。

Take a look at ICU4J.
Especially things like MessageFormat, PluralFormat, SelectFormat to deal with messages, and that can also take care of date/time/number/currency formatting. Or use various formatters directly (DateFormat, NumberFormat, etc.)
ChoiceFormat in Java is also worth a look.

But in general the resource bundles mechanism coupled with MessageFormat is almost always enough (take a look at UResourceBundle in ICU4J, more powerful than the Java ResourceBundle).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文