If you are using common source code in java and J#, this is how you get your resources across. Assume you have the resource files:
resources.properties
resources_en.properties
resources_en_US.properties
...
- Download vjsresgen from the Microsoft website and build it (it comes as source, not as aa .exe).
- run "vjsresgen /out:jsResources.resx *.properties". You cannot put this in your pre-build event as it then puts the full directory name as your resources name!
- For your project, do Add, Existing Item, and add jsResources.resx
- In your code put "ResourceBundle resources = ResourceBundle.getBundle("resources");". Note that the parameter is "resources" and not "jsResources"!
- call "String str = resources.getString("dave");".
That's it - works great.
Do you find this useful? If so please check out Windward Reports.

Comments