[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: NL support in Eclipse?

Johnson,

A little late but perhaps better than never...

The $nl$ variable can be used when defining the runtime libraries for your
plugin.  In the plugin.xml file you would say something like
    <runtime>
        <import name="$nl$/messages.jar"/>
    </runtime>
The platform would then search for the file call messages.jar in the
following places (lets assume that the current locale is Japanese jp_JP)

[your plugin install dir]/nl/jp_JP/
[your plugin install dir]/nl/jp/
[your plugin install dir]/

If messages.jar is found in any of these locations, that location is added
to the classpath of the plugin.  An important note is that this mechaism is
simply manipulating the classpath.  It does not change the way Java
resolves/finds resource bundles, just adds more places to look.

This mechanism is particularly useful if your locale specific support
includes code in addition to resource bundles.  Note also that there are
similar facilities for the $os$ (Operating system) and $ws$ (window system)
variables.

Jeff

"Johnson Cheng" <jcheng@xxxxxxxxxx> wrote in message
news:9iv0e5$t9f$1@xxxxxxxxxxxxxxxx
> Does anyone know how to use the "$nl$" variable to support different
> language files? I have read a post on this newsgroup a while ago that
> mentioned that, so is it still supported in R0.9? Any success stories or
> code examples would be appreciated. Thanks.
>
>