Столкнулся с тем, что такой код на java читает выборочно читает данные из .properties
import java.util.Locale;
import java.util.ResourceBundle;
class InternationalisationTest{
public static void main(String[] args){
Locale locale = new Locale("", "");
ResourceBundle rb = ResourceBundle.getBundle("translate1", locale);
System.out.println(rb.getString("deliverynote")); //отрабатывает нормально
System.out.println(rb.getBundle("shippingdate"));//а тут валится
}
}
Delivery note
Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name shippingdate, locale ru_UA
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1539)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1278)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:733)
at InternationalisationTest.main(InternationalisationTest.java:15)
#Test international resource
deliverynote = Delivery note
shippingdate = Shipping date
numberofplaces = Number of places
supplier = Supplier
address = Address
usreou = USREOU