Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] how to localize the built in controls (e.g. the Date Renderer)?
[EMF Forms] how to localize the built in controls (e.g. the Date Renderer)? [message #1714902] Tue, 17 November 2015 15:52 Go to next message
Peter Hermsdorf is currently offline Peter HermsdorfFriend
Messages: 27
Registered: August 2011
Junior Member
Hi,

what would be the best approach to localize build in controls, especially the Date Renderer/Display?

Currently there is an english date and time format (my system return de_de as default locale) and when no date is set it displays the english text from the constant DateTimeControl_NoDateSetClickToSetDate from org.eclipse.emf.ecp.view.core.swt/OSGI-INF/l10n/bundle.properties.

I tried making a fragment to this plugin with a Bundle-Localization directive in the MANIFEST.MF and providing a localized bundle_de.properties file.

Even if that would work out somehow the dateformat that is used would still be english.

Any hints on how to customize that?

BTW: currently I'm not using a custom view model, since the default rendering is ok.

Thanks.

Greets, Peter
Re: [EMF Forms] how to localize the built in controls (e.g. the Date Renderer)? [message #1714979 is a reply to message #1714902] Wed, 18 November 2015 09:21 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 168
Registered: May 2015
Senior Member
Hi Peter,
The DateTimeWidget of SWT doesn't support locales, see Bug .
We have a renderer for the XMLGregorianDate which uses a text field in order to display the date, you could use this. An example is in the MakeItHappenModel (User -> dateOfBirth)
We would also accept a contribution with an implementation of the date renderer based on a text field.

Cheers,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] how to localize the built in controls (e.g. the Date Renderer)? [message #1715007 is a reply to message #1714979] Wed, 18 November 2015 13:02 Go to previous message
Peter Hermsdorf is currently offline Peter HermsdorfFriend
Messages: 27
Registered: August 2011
Junior Member
After trying XMLGregorianDate i now see the difference. I think that will work for my simple Use Case.
Thanks for the pointing that out!

Greets, Peter
Previous Topic:[EMFForms] Dependency Injection fails on render of view
Next Topic:[CompleteOCL] Programmatically register ocl file with EMF model
Goto Forum:
  


Current Time: Sun Sep 27 07:29:31 GMT 2020

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

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

Back to the top