public Map<Locale, Map<String, String>> loadData(CmsObject cms, CmsVfsBundleParameters params) throws Exception {

        CmsFile file = cms.readFile(params.getBasePath());
        CmsXmlContent content = CmsXmlContentFactory.unmarshal(cms, file);
        Map<Locale, Map<String, String>> result = Maps.newHashMap();
        for (Locale locale : content.getLocales()) {
            List<I_CmsXmlContentValue> messages = content.getValues(N_MESSAGE, locale);
            Map<String, String> currentLocale = new HashMap<String, String>();
            for (I_CmsXmlContentValue messageValue : messages) {
                String path = messageValue.getPath();
                I_CmsXmlContentValue keyValue = content.getValue(CmsXmlUtils.concatXpath(path, N_KEY), locale);
                String keyStr = keyValue.getStringValue(cms);
                // Ignore leading/trailing spaces in the key to protect from user error
                keyStr = keyStr.trim();
                I_CmsXmlContentValue valueValue = content.getValue(CmsXmlUtils.concatXpath(path, N_VALUE), locale);
                String valueStr = valueValue.getStringValue(cms);
                currentLocale.put(keyStr, valueStr);
            }
            result.put(locale, currentLocale);
        }
        return result;
    }
public Map < Locale , Map < String , String > > loadData ( CmsObject cms , CmsVfsBundleParameters params ) throws Exception { CmsFile file = cms . readFile ( params . getBasePath ( ) ) ; CmsXmlContent content = CmsXmlContentFactory . unmarshal ( cms , file ) ; Map < Locale , Map < String , String > > result = Maps . newHashMap ( ) ; for ( Locale locale : content . getLocales ( ) ) { List < I_CmsXmlContentValue > messages = content . getValues ( N_MESSAGE , locale ) ; Map < String , String > currentLocale = new HashMap < String , String > ( ) ; for ( I_CmsXmlContentValue messageValue : messages ) { String path = messageValue . getPath ( ) ; I_CmsXmlContentValue keyValue = content . getValue ( CmsXmlUtils . concatXpath ( path , N_KEY ) , locale ) ; String keyStr = keyValue . getStringValue ( cms ) ; keyStr = keyStr . trim ( ) ; I_CmsXmlContentValue valueValue = content . getValue ( CmsXmlUtils . concatXpath ( path , N_VALUE ) , locale ) ; String valueStr = valueValue . getStringValue ( cms ) ; currentLocale . put ( keyStr , valueStr ) ; } result . put ( locale , currentLocale ) ; } return result ; }
@see org.opencms.i18n.CmsVfsResourceBundle.I_Loader#loadData(org.opencms.file.CmsObject, org.opencms.i18n.CmsVfsBundleParameters)