[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: Using Plug-in properties API?
|
- From: Paul Webster <pwebster@xxxxxxxxxx>
- Date: Tue, 26 Feb 2008 10:13:01 -0500
- Newsgroups: eclipse.platform
- Organization: EclipseCorner
- User-agent: Thunderbird 1.5.0.12 (X11/20070529)
There is no API to access that file ... that's not the way you do view i18n.
You could ... get your OSGi Bundle and get the Bundle-Localization
header, and then try and get the .properties file using getResource(*)
and then use ResourceBundle to try and load things from it ... it sounds
painful.
The eclipse best practice is to place localization for plugin.xml and
MANIFEST.MF into the plugin.properties. Localization for UI code should
go in a NLS extending class and matching properties file in the
directory that defines the ViewPart (for example). As Manuel mentioned,
there's pretty good tooling that allows both a ResourceBundle and
eclipse-NLS class based approach.
Later,
PW
--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench.htm