Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
您是否正在寻找本地化框架或具有本地化功能的 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
看看 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).