Home » Eclipse Projects » Eclipse Platform » Selecting the message.properties files which should be used
| | | | |
Re: Selecting the message.properties files which should be used [message #329219 is a reply to message #329217] |
Mon, 16 June 2008 15:26   |
Eclipse User |
|
|
|
Hi Tom,
I found it: Locale.getDefault().toString(); returns the passed parameter.
I can now read the correct properties via the following:
private static final String BUNDLE_NAME = "messages.messages_";
String nl = Locale.getDefault().toString();
NLS.initializeMessages(BUNDLE_NAME + nl, MessagesEclipse.class);
Thank you again, the -nl was extremely helpful. For the incorrect
documentation I opened a bug report.
Best regards, Lars
"Lars Vogel" <Lars.Vogel@gmail.com> wrote in message
news:g36dmd$ase$1@build.eclipse.org...
> Hi Tom,
>
> cool, I didn't know about the -nl option. This should solve my problem.
>
> Hm... any idea what to use to get this parameter? The documentation tells
> me to use
> BootLoader.getNL();
>
> but this class is @deprecated and no longer relevant according to the
> source code.
>
> Best regards, Lars
>
>
>
>
> Best regards, Lars
> "Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
> news:g368vq$hv7$1@build.eclipse.org...
>>I think he is searching for the -nl command line option but I'm not sure
>>about the following things:
>> - NLS supports a 3 application specific suffix
>> - One can leave out the first 2 parts
>>
>> My wild guess would be that they have to be named:
>> message_de_DE_app1.properties and then one can use -nl de_DE_app1 when
>> starting up eclipse but I'm not sure about it.
>>
>> Tom
>>
>> Rich Kulp schrieb:
>>> Is this a question about developing Eclipse plugins, or is this a
>>> straight standard Java application question? This newsgroup is for
>>> Eclipse related questions.
>>>
>>> Lars Vogel wrote:
>>>> Hello,
>>>>
>>>> I have a program which is used by two different departments. They want
>>>> to label the fields in the application differently.
>>>>
>>>> This this I have created different message.properties files, e.g.
>>>>
>>>> message.properties
>>>> message_app1.properties
>>>> message_app2.properties
>>>>
>>>> I would like to select the correct property files via a startup
>>>> parameter. Is this possible and if how?
>>>>
>>>> Best regards, Lars
>>>>
>>>
>>
>>
>> --
>> B e s t S o l u t i o n . at
>> ------------------------------------------------------------ --------
>> Tom Schindl JFace-Committer
>> ------------------------------------------------------------ --------
>
>
|
|
| | | | |
Goto Forum:
Current Time: Wed May 07 16:01:28 EDT 2025
Powered by FUDForum. Page generated in 0.04775 seconds
|