This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 125798 - I18N - Internationalizing RCP application
Summary: I18N - Internationalizing RCP application
Status: RESOLVED INVALID
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@ide
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-01-22 21:03 UTC by gekkothelizard
Modified: 2008-02-15 19:16 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gekkothelizard 2008-01-22 21:03:30 UTC
There is (or at least doesn't seem to be) any way to internationalize the core components of an RCP application. By core
component I mean everything that is given by the platform. The simplest example for this is a notify dialog created with
DialogDisplayer. There is no way I could internationalize the title of the dialog and/or the labels on the ok/cancel
buttons.

I have looked into the code of the Dialog API and the NBBundle class, and the problem seems to be that NBBundle is
always loading strings for a class from a bundle that is in the class's package. There is no way one module in the
program could change the strings for another, what in my opinion is a big problem when building RCP apps.

My proposal for fixing this problem is, a simple method, with which you could replace the entry for a class in NBBundle
for whatever you want.

And I almost forgot to mention that I have seen the recommendation on the Platform Internationalization page, that I
should build against an internationalized version of NB. This of course if not an option if you're developing for any
language for which an internationalized version doesn't exist.
Comment 1 Ken Frank 2008-02-14 20:41:38 UTC
what type of netbeans project is being used ?

and is it wanted to translate the actual parts of netbeans that is part of
your appliocation, assuming this is a netbeans module application ?

or is to i18n something like the dialog that is created for you ?
in this case I think the i18n wizard could be used or related functionality
in gui builder ?

ken.frank@sun.com
Comment 2 gekkothelizard 2008-02-15 10:31:17 UTC
I'm building a module suite application, and I want to internationalize the dialogs opened by DialogDisplayer.notify(...)
Comment 3 Ken Frank 2008-02-15 18:06:10 UTC
can you tell the steps used for how you create your dialog - like create module suite, then create module,
then do you use the file=> new to create something like a wizard or other window ?
(and then use gui builder to create dialog) ?

ken.frank@sun.com
Comment 4 gekkothelizard 2008-02-15 18:13:10 UTC
I didn't create the dialog with GUI builder. I know all stuff in GUI builder can be internationalized. I'm talking about
the standard dialogs opened by DialogDisplayer in Dialogs API module.

To clarify here is the code I used to create the dialog:

NotifyDescriptor desc = new NotifyDescriptor.Confirmation("Hello", NotifyDescriptor.YES_NO_OPTION);
DialogDisplayer.getDefault().notify(desc);

In this case I found no way I could internationalize the 'Yes' and 'No' buttons. This also applies to many built in
features in the platform.
Comment 5 Ken Frank 2008-02-15 19:02:07 UTC
am changing to what I think is the category for this issue,
so could get more information on this from that team.

ken.frank@sun.com
Comment 6 Jesse Glick 2008-02-15 19:16:26 UTC
In NB localizations are supplied as e.g. Bundle_ja.properties files which live in special JARs such as
modules/locale/your-module-name_ja.jar. This applies to modules present in the NB Platform as well as your own modules.

http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html

Please use dev@openide.netbeans.org for assistance.