title: GWT interface like Constants
body: <p>In my application I need to use dynamic localization, so I cannot use Constants interface. I did use Constants for a while, but now I need texts to be changed without compiling so I had to find some other way.</p>
  
  <p>So I am using Dictionary now. The thing is, when I now want to use text in UiBinder, I can only use methods without arguments. So I created class "StringIdentifiers" where I have the same methods I previously had in MyConstants, but I have to specify a body here for every method to return the specified String.</p>
  
  <p>So for example I have:</p>
  
  <pre><code>Dictionary locale = Dictionary.getDictionary("myJsObjectWithStrings");
  
  //and then the methods for returning the actual strings from the JS object
  String loading(){
     return locale.get("loading");
  }
  </code></pre>
  
  <p>I would like the method to only be</p>
  
  <pre><code>String loading();
  </code></pre>
  
  <p>since the rest is always the same with the name of the method appearing as String parameter in the get() method. Possibly even returning some default value when the String is missing in the JS object. But I do not know how to do that. I checked the Constants interface, but I do not really understand the code there. Can someone please give me an example how to implement such a thing?</p>