09-13-2010 01:07 PM
I have a library which provides a common code base for several applications. This library provides UI components and similar textual content related components used by the applications, so it has to use locale resources.
So this library needs access to its associated *.rrh/*.rrc files to compile properly. So far everything is working properly.
But a library may provide default messages, it should not impose limits for the supported locales or the preferred wording for a specific application. What I want to do is, to allow the application to "overwrite" the locale resources of a library. (Not really overwriting, since it would be enough to separate the default and the specific languages.)
I tried to leave only the *.rrh and default language *.rrc files in the library and put the *_en.rrc/*_de.rrc files in the application project. This leads to "*.rrh file not found" messages. If I copy the *.rrh file also into the application project, it leads to -- not really surprising -- "duplicate definition errors.
I didn't find any information on how that is supposed to work, even though in my opinion this concept doesn't seem to be so far fetched.
So, if somebody could give some hints for me to resolve this issue, I would appreciate any help. :-)
Thanks in advance.
Solved! Go to Solution.
09-14-2010 07:19 AM
I'm using IntelliJ with BB-Ant-Tools and Eclipse with the current plugin. IntelliJ for the "real coding" and Eclipse for creating the resource bundles and launching the simulator.
I have setup my projects in the way that the plugin understands the project structure ("Library" and "Application" projects, dependencies, etc.) so I can build in Eclipse without Ant und run the simulator.
The Ant build uses it's own directories for building and storing the distributables, so the two build processes don't interfere with each other.
09-14-2010 07:20 AM
this is not possible in the way you are thinking now.
you could add optional methods to the classes in question, like setMessage(newString), to customize the strings.
09-14-2010 07:33 AM
Hmmm, yes, I suspected that... My "plan B" is based on injecting the required information. I just hoped I had overseen something, so I could avoid the refactoring...
Thanks so far!