I have a requirement to load text labels from our CMS. The content is exposed in standard properties file format. The CMS operates as a sort of RESTful web service provider as opposed to pushing files, so I would need to pull properties files on demand. I was naively hoping that if I created a ReloadableResourceBundleMessageSource and set the basename to the URL of the file minus the locale parameter, that this would work like magic, but evidently it doesn't. Can anyone suggest an approach to this? Is there an out-of-the-box solution in Spring or is there some class that I would need to extend?
So, skaffman's comment was correct. My web service was just expecting the locale as a GET param (locale=en_US), but was getting a file suffix (ie, locale=_en_US.properties). So, it was as simple matter of stripping the extra stuff from the param and it actually works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With