|
Re: NLS in RAP applications [message #56769 is a reply to message #56742] |
Fri, 02 November 2007 09:18 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Hi Peter,
we are currently working on NLS support for RAP. It should be available
in CVS soon.
Here is roughly how we plan to implement NLS support in RAP:
* there will be API to determine the locale for the
current request. This even allows to have different
translations for each request. The returned value
reflects the users' browser-settings (HttpServletRequest
#getLocale()).
For background processes the locale of the most
recent request within the session will be returned.
* there will be API to explicitly set the locale for a
session. From thereon the above mentioned API will
just return this very locale.
* if your NLS code in RCP looks like this:
label.setText( MyMessages.Welcome_Text );
your RAP code would look like this:
label.setText( MyMessages.get().Welcome_Text );
The "get()" indirection handles the case that there
is a need for more than one translation per VM.
Cheers,
Rüdiger
Peter Kullmann wrote:
> Hi
>
> Can I use the eclipse NLS components in RAP applications? Is it possible
> that every session has its own NLS settings; ie. one user works in a
> german session wheras another uses an english session.
>
> Thanks
> Peter
|
|
|
Re: NLS in RAP applications [message #58028 is a reply to message #56769] |
Tue, 06 November 2007 21:49 |
Eclipse User |
|
|
|
Originally posted by: eclipse-dev.volanakis.de
> * if your NLS code in RCP looks like this:
> label.setText( MyMessages.Welcome_Text );
> your RAP code would look like this:
> label.setText( MyMessages.get().Welcome_Text );
Personally, I'm not too fond of this suggestion, because it introduces
different APIs between an RCP Application and the RAP counterpart, thus
making it less attractive -- but I don't see how to support multiple
languages per VM differently at this moment...
Maybe MyMessages.get().Welcome_Text could also work in the RCP App, so
that I could use the same "style" in both Apps?
Just wondering,
Elias.
|
|
|
Re: NLS in RAP applications [message #58178 is a reply to message #58028] |
Wed, 07 November 2007 07:57 |
Eclipse User |
|
|
|
Originally posted by: fappel.innoopract.com
Hi,
unfortunately the RCP solution doesn't work on the server-side, and it even
doesn't work for all use-cases in RCP. Switching the language of an
application that is already running for example doesn't work. So there is no
chance to reuse NLS as it is currently used in RCP, and believe us we don't
like this eighter. Moving the class variables to instance variables seemed
to be the least invasive solution. From a technical point of view the other
way round meaning using RAP NLS in RCP applications is at least feasible.
Ciao
Frank
"Elias Volanakis" <eclipse-dev@volanakis.de> schrieb im Newsbeitrag
news:fgqnhr$rhn$1@build.eclipse.org...
>> * if your NLS code in RCP looks like this:
>> label.setText( MyMessages.Welcome_Text );
>> your RAP code would look like this:
>> label.setText( MyMessages.get().Welcome_Text );
>
> Personally, I'm not too fond of this suggestion, because it introduces
> different APIs between an RCP Application and the RAP counterpart, thus
> making it less attractive -- but I don't see how to support multiple
> languages per VM differently at this moment...
>
> Maybe MyMessages.get().Welcome_Text could also work in the RCP App, so
> that I could use the same "style" in both Apps?
>
> Just wondering,
> Elias.
|
|
|
Re: NLS in RAP applications [message #58467 is a reply to message #58178] |
Thu, 08 November 2007 04:55 |
Eclipse User |
|
|
|
Originally posted by: eclipse-dev.volanakis.de
> to be the least invasive solution. From a technical point of view the
other
> way round meaning using RAP NLS in RCP applications is at least feasible.
Thanks for the info. Using the RAP-style-NLS in an RCP Application seems
like an acceptable compromise.
Kind regards,
Elias.
Frank Appel wrote:
> Hi,
>
> unfortunately the RCP solution doesn't work on the server-side, and it even
> doesn't work for all use-cases in RCP. Switching the language of an
> application that is already running for example doesn't work. So there is no
> chance to reuse NLS as it is currently used in RCP, and believe us we don't
> like this eighter. Moving the class variables to instance variables seemed
> to be the least invasive solution. From a technical point of view the other
> way round meaning using RAP NLS in RCP applications is at least feasible.
>
> Ciao
> Frank
>
>
> "Elias Volanakis" <eclipse-dev@volanakis.de> schrieb im Newsbeitrag
> news:fgqnhr$rhn$1@build.eclipse.org...
>>> * if your NLS code in RCP looks like this:
>>> label.setText( MyMessages.Welcome_Text );
>>> your RAP code would look like this:
>>> label.setText( MyMessages.get().Welcome_Text );
>> Personally, I'm not too fond of this suggestion, because it introduces
>> different APIs between an RCP Application and the RAP counterpart, thus
>> making it less attractive -- but I don't see how to support multiple
>> languages per VM differently at this moment...
>>
>> Maybe MyMessages.get().Welcome_Text could also work in the RCP App, so
>> that I could use the same "style" in both Apps?
>>
>> Just wondering,
>> Elias.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03097 seconds