Getting server-side GWT i18n interfaces is easy with java.lang.reflect.Proxy .
Our team put the properties of the GWT i18n files in the same place as the com.google.gwt.i18n.client.Messages classes that they generate. They are then deployed in the same directory as the class files, somewhere under / classes, and therefore on the path to the Webapp network.
Read in the ResourceBundle from the file with the expanded properties. In the previous step, searching for the properties file is simple: this is the name of the GWT i18n interface.
GWT i18n's proxy server-side interface and use the InvocationHandler proxy server to search for ownership in the ResourceBundle . Finding the right property is also easy: this is the name of the calling Method .
You now have the GWT i18n interfaces created on the server. You can edit the properties file and reinstall without recompiling. However, the changed constants will not be raised on the client side.
source share