On Jan 24, 10:04 pm, Ashish Khivesara <[email protected]> wrote: > Hi, > I am trying to do a simple constant lookup. com.google.gwt.i18n.client. > Constants is what I need to use. > > I created the interface > > public interface PhotoConstants extends Constants{ > > String appName(); > > } > > I am calling is in GWT Entry Point code as follows > > PhotoConstants constants = (PhotoConstants)GWT.create(PhotoConstants.class); > Window.alert(constants.upnpAppName()); > > I created a PhotoConstants.properties file in war/ directory.
The *.properties file should be in the same package as the corresponding *.java file. This is a compile-time thing, and the compiler doesn't look into your war/ directory (it only outputs into it) > However I get the following Exception. > > This maybe because I dont have the properties file in the correct location?? > The documentation does not say anything about it though... http://code.google.com/webtoolkit/doc/latest/DevGuideI18n.html#DevGuidePropertiesFiles says: """Static string internationalization uses traditional Java .properties files to manage translating tags into localized values. These files may be placed into the same package as your main module class. They must be placed in the same package as their corresponding Constants/Messages subinterface definition file.""" -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
