我对 i18n 使用java.util.ResourceBundle
,如下所示:
try {
resourceBundle = ResourceBundle.getBundle("Messages", locale);
} catch (MissingResourceException ex) {
logger.log(Level.SEVERE, ex.getMessage(), ex);
}
String localizedString = resourceBundle.getString("key");
我想创建复数形式很好。喜欢:
one object
two objects
如何定义本地化字符串的复数形式?
最佳答案
以下是 Java 处理复数形式的方式:
https://docs.oracle.com/javase/tutorial/i18n/format/choiceFormat.html
关于java - Java java.util.ResourceBundle 的复数形式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30965573/