resource-bundle

How can I check if a resource bundle key does not exist using JSTL tags?

I have a resource file that will have some optional keys. If the optional resource key is not present, I set a default instead. It appears that there is no easy way to determine if a key exists in the resource bundle. So this is what I'm doing to get around it. <fmt:message var="title" key="login.reg.signup.${signupForm.regfrom}.title"...

How to load a resource bundle from a file resource?

I have a file called mybundle.txt in c:/temp - c:/temp/mybundle.txt how do I load this file into a java.util.resource bundle? The file is a valid resource bundle. This does not seem to work: java.net.URL resourceURL = null; String path = "c:/temp/mybundle.txt"; java.io.File fl = new java.io.File(path); try { resourceURL = fl.to...

Why doesn't this sample code from Apple work?

I am trying to find the full path for a file called 'file1.jpg' I have verified that it is in the app bundle and yet when I run this code: NSBundle* myBundle = [NSBundle mainBundle]; NSString* path = [myBundle pathForResource:@"file1" ofType:@"jpg"]; 'path' doesn't have the path/file i'm expecting. This is code directly from the ...

Multiple messageSources in Spring configuration files

Hi, our web application uses Spring 2.5. It consists of several modules, each of which can bring additional Spring context files, which are loaded automatically (into one application context). We want to let each module provide additional resource bundles (for I18N support). Spring supports internationalization by registering a bean wi...