Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] controls l10n
[EMF Forms] controls l10n [message #1710206] Mon, 05 October 2015 11:09 Go to next message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
Hi

How does l10n work for view controls? The controls have names like "Control foobar". The the labels are rendered like "Foobar".

I tried to name the control like "%foobar" and adding entry "foobar=Foobaz" into OSGI-INF/l10n/bundle.property of my views bundle, as well of my main plugin bundle, but none seem to work - the label is still "Foobar".
Re: [EMF Forms] controls l10n [message #1710254 is a reply to message #1710206] Mon, 05 October 2015 14:33 Go to previous messageGo to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 30
Registered: January 2015
Member
Am 05.10.2015 13:09, schrieb Klim Tow:
> How does l10n work for view controls? The controls have names like
> "Control foobar". The the labels are rendered like "Foobar".
>
> I tried to name the control like "%foobar" and adding entry
> "foobar=Foobaz" into OSGI-INF/l10n/bundle.property of my views bundle,
> as well of my main plugin bundle, but none seem to work - the label is
> still "Foobar".

Hi Klim,

I just did l10n for my e4-Application with EMF Forms today as you
described and what is very well described here:
http://www.vogella.com/tutorials/EclipseInternationalization/article.html#i18n_osgi

It worked like a charm.

I've put the bundle_en.properties and bundle_de.properties in a
OSGI-INF/l10n/ folder in the project of the viewmodel and referenced the
labels by %label as you described.

Worked very well.

Cheers,
Hauke
Re: [EMF Forms] controls l10n [message #1710257 is a reply to message #1710254] Mon, 05 October 2015 14:47 Go to previous messageGo to next message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
Hi Hauke

the problem is related only to controls.

I tried the example application shipped with EMF Forms org.eclipse.emf.ecp.makeithappen.application.sample.e4. It doesn't work for controls, but for other labels, as described here: http://eclipsesource.com/blogs/tutorials/how-to-customize-emf-forms/

Re: [EMF Forms] controls l10n [message #1710330 is a reply to message #1710257] Tue, 06 October 2015 07:17 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 174
Registered: May 2015
Senior Member
Hi Klim,
the control name is not taken into account when rendering the control itself. The label text in front of the control is retrieved from the model.
So in order to localize the control label you have to provide an localization to your model.
You can do this by providing a localized plugin.properties in the mymodel.edit bundle eg plugin_fr.properties. Of course you can do this also using a fragment.
The label is taken from the _UI_MyElement_MyFeature_feature and the tooltip text is taken from _UI_MyElement_MyFeature_description (this is not generated as long as you don't pass a text to the description property in the genmodel)

Cheers,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] controls l10n [message #1710360 is a reply to message #1710330] Tue, 06 October 2015 08:29 Go to previous message
Klim Tow is currently offline Klim TowFriend
Messages: 49
Registered: September 2015
Member
thank you Eugen

fragment of .edit-bundle is a handy solution

Previous Topic:[EMF Forms] render view inside a scrollable composite
Next Topic:[EMF Forms] Tree Master Detail endless-loop
Goto Forum:
  


Current Time: Thu Mar 28 22:28:27 GMT 2024

Powered by FUDForum. Page generated in 0.02511 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top