|
March 2008
[
mkleint
]
08:36, Monday, 31 March 2008
It's a good practice to have your code internationalized. The coding pattern for doing so in NetBeans modules is following: org.openide.util.NbBundle.getMessage(FindResultsPanel.class, "FindResultsPanel.btnModify.text") Here the FindResultsPanel is the class where the text is used, The Bundle.properties file resides in the same package as the class and the getMessage method makes sure it loads properly in an efficient manner. If you are coding a NetBeans module, you should avoid calling However it's been always a pain to edit the text. First you ned to find the I18N token, then find and open the relevant Bundle.properties file and then find the line with the I18N token. The pain has become unbearable for me and I created a simple module that's capable of "hyperlinking" to the correct location in the correct resource bundle file directly from the java source file. The module NBM file can be downloaded from here. Enjoy. |