Does Java have an equivalent to .NET resource (.resx) files for localization?
In .NET, you can define resources as key-value pairs within a standard XML document.
The resource files are named according to the culture. For example:
myresources.resx
myresources.en-us.resx
myresources.fr-fr.resx
myresources.de-de.resx
Is there an equivalent in Java? Are the similar naming conventions used for files?
The Java equivalent is called
ResourceBundle. Resource Bundle are java properties file (with a.propertiesfile extension that can be accessed using java.util.ResourceBundle class) that contains locale-specific data.From your example,
Is equivalent to (in java)
For Technical data on
ResourceBundlecheck this Oracle article here: https://docs.oracle.com/javase/tutorial/i18n/resbundle/concept.html