All,
This may sound a little crazy, but I’ll give it a try. We have a java
swing app that is multilingual. To do this, each button, title, etc has
a translation to occur similar to the way rails does it with a
name/value pair. The name being a tag in the user dictionary to the
value to use. A tag is defined for a particular component and is
compiled as part of the java class. Now the good part is these tags
follow defined patterns like SomeDictionary.TITLE or
<java.classname-of-the-internalframe>.TTILE for say the title of the
frame. Is there a way to get these out of the java class using jruby?
Or, am I nuts going down this path? This way we can help ourselves and
user to translate the given frame by listing all the translation “tags”
of a given frame.
Just curious if this is even possible by loading the class in jruby or
maybe even examining the class file itself. I know using a command line
tool like grep or vim I can see the literal in the compiled code, but I
like to get these in a list. I tried in jirb to do
FrameClass.constants. But, these constants are not defined in say this
class but in imported classes.
Regards,
GregD