Obviously, this ResourceBundlerequires a properties file, such as syntax, in the found files.
We have a situation where we want to use whole files (in our case HTML files) as "values". This means that we do not have keys as such. Perhaps the file name will work as a key.
Here is the directory tree:
src/
main/
resources/
html/
content.html
content_de.html
content_fr.html
content_es.html
order.html
order_de.html
order_fr.html
order_es.html
Now we need logic to find the correct file based on the current locale. If the current language is German and I am looking for a file html/content.html, it should find html/content_de.html. It does not have to be downloaded immediately. Is there any existing mechanism in Java? Do I need to do this manually?
- . , Java 6 SE -, ; , , .
№ 1:
messages.properties, HTML . , (, , , ).
EDIT # 2: , .