In SSJS you can access the property files with getResourceAsStream method.
var data = "";
var ex = facesContext.getExternalContext();
var io:java.io.InputStream = ex.getResourceAsStream("strings_en.properties");
var i;
do{
i = io.read();
data += @Char(i)
}while( i != (-1) )
The variable data contains now the whole *strings_en.properties file.
An example to load the properties directly in a java.util.Properties instance can be found here:
http://openntf.org/XSnippets.nsf/snippet.xsp?id=access-.properties-files
In LS it is more complicated:
- You need a lookup view for the design elements, with the field $FileNames as key
- This allows you to search for the property file.
- Then you can export the design document with dxl
- In the exported DXL, you have to search for the $FileData item
- In the item there is the BASE64 encoded property file
- Decode it, skip the first 30 characters (header informations like size of the RT)
- Parse it line by line