What exactly? The Locale changes at runtime? Possibly not, as the Eclipse
Translation Pattern is based on the dynamic injections. The pattern itself
simply says that you move the translation mechanism to a separate method
that is called via dynamic injection. So you could try to trigger it
manually too if you know that the Locale changed. The question you need to
answer on that is, how to get informed that the Locale has changed? The
mechanism itself is listening to dynamic changes of the Locale in the
context, while the pattern listens for dynamic injections of the Messages
instances.

The new message extension itself is an OSGi service. Well two services to
be more precise. The TranslationObjectSupplier which is an
ExtendedObjectSupplier to get the @Translation annotation to work in
conjunction with the IMessageFactoryService, which is an OSGi service that
creates the Messages instance and fills the values dependent on the current
set Locale. But you need the BundleLocalization object to get it working.
If you can grab that from the registry aswell (it is also an OSGi service)
than it should be possible to use the mechanism also in an 3.x application.
Surely with some more pain than in an 4.x application. But that is true for
almost every use case. ;-)


On Mon, Oct 7, 2013 at 3:18 PM, Wim Jongman <[email protected]> wrote:

> That is cool too. I was planning to ask you: can that be used without
> injection as well. I mean in a 3.X rcp just by grabbing the service from
> the registry?
>
> Regards,
>
> Wim
>
>
> On Mon, Oct 7, 2013 at 3:05 PM, Dirk Fauth <[email protected]> wrote:
>
>> Your welcome! :) Even though I'm not sure why you appreciate it that
>> much. It were just a few extensions and bug fixes.
>>
>> The new message extension that introduces the Eclipse Translation Pattern
>> for adding support to change the Locale at runtime in Eclipse based
>> applications should get that attention! ;-)
>>
>>
>> On Mon, Oct 7, 2013 at 12:47 PM, Mickael Istria <[email protected]>wrote:
>>
>>>  Thanks Dirk!
>>> --
>>> Mickael Istria
>>> Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
>>> My blog <http://mickaelistria.wordpress.com> - My 
>>> Tweets<http://twitter.com/mickaelistria>
>>>
>>> _______________________________________________
>>> nebula-dev mailing list
>>> [email protected]
>>> https://dev.eclipse.org/mailman/listinfo/nebula-dev
>>>
>>>
>>
>> _______________________________________________
>> nebula-dev mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/nebula-dev
>>
>>
>
> _______________________________________________
> nebula-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/nebula-dev
>
>
_______________________________________________
nebula-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/nebula-dev

Reply via email to