Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[e4-dev] [Proposal] Locale switching

Hi,

Now that the new message stuff is in the runtime repo I've been having
offline discussions with Dirk Fauth on how to get dynamic language
switching for the complete e4 UI.

I guess most of you know that the the low-level of our model is prepared
to make such a language switch possible at ANY level of the application
because the locale is resolved against the nearest context.

So here's our proposal to allow applications to switch the language:

a) Language switch is announced through the event-broker
b) Renderers register themselves as listeners and update the localized
   data
c) Language switching is provided to clients through
   LocaleSwitchService. A first draft looks like this:

   interface LocaleSwitchService {
      public void switchApplicationLanguage(Locale locale);
      public void switchContextLanguage(IEclipseContext c,Locale locale);
   }

I'm a bit indifferent on switchContextLanguage because I don't feel
comfortable exposing the IEclipseContext in any API and I'm uncertain
switching the language at a certain context is the 99% case. I currently
lean towards switchApplicationLanguage.

This E-Mail is just to get out the message that there's something coming
maybe in Luna, I won't do the work myself but help Dirk to accomplish
the task.

Tom


Back to the top