webforms - Java ResourceBundle loads strings from wrong file -
i create jar file enbedded , called applet asp.net web forms application.
i use resourcebundle load localized strings properties.
i created 3 properties files:
localizedstrings.properties localizedstrings_de.properties localizedstrings_en.properties
and load strings with
resourcebundle labels = resourcebundle.getbundle("localizedstrings", locale.german);
however strings loaded strange location : login.aspx (which in same directory applet.jar)
when call collections.list(labels.getkeys()).get(0)
i see contents of login.aspx in there, unusual, have tried other bundle names , same results.
what problem here?
i not strange location. since haven't provided location really, natural place java classpath. if want change somehow, need use qualified name base name, i.e.:
resourcebundle.getbundle("com.my.company.localizedstrings", locale.german);
the doubt have, since use j# whether work. should.
Comments
Post a Comment