I am trying to use ListResourceBundle for localizing my web app. It works well but checkstyle shows warning
public class Locale_en_US extends ListResourceBundle {
@Override
protected final Object[][] getContents() {
return new Object[][]{
{"Login.Enter-with", "Enter with"},
{"Login.Hello", "Hello"},
{"Login.Test-Description", "You will have 40 minutes after "
+ "starting test, to finish it"}
};
}
}
And after use it:
ResourceBundle resourceBundle = ResourceBundle.getBundle("Locale",request.getLocale());
String testDescr=resourceBundle.getString("Login.Test-Description")
"Name 'Locale_en_US'
must match pattern '^[A-Z][a-zA-Z0-9]*$'.".
Is where any way to fix this except of changing checkstyle ruleset?