OptionsGroup remove enum name before value

Hi

I have an databounded optionsGroup with 3 values
How can I remove the enum name before the value on the web screeen?

The field is bound to the enum ‘priority’.
Values are Low, Middle, High

Now n the screen I have values like:

Priority.Low
Priority.Middle
Priority.High

I want to remove the ‘Priority’ in these names.

Thanks
Thomas

Hi,

You need to define localization messages for the enum values in a message pack located in the same directory, e.g.:

CustomerGrade=Customer Grade
CustomerGrade.PREMIUM=Premium
CustomerGrade.HIGH=High
CustomerGrade.STANDARD=Standard

Regards,
Gleb

Hi Gleb

thanks for response.
But I’m not 100% sure what do you mean with that?

I have added a screenshot of my web screen.
There you can see that the Labels are not as expected oft the enum fields.

20

Thnkas for help
Thomas

As I mentioned above you need to localize enum values. You can do it either from UI (see the image below) or manually as I described above.

35

Hi Gleb

thanks for your reply.
It works perfect.

Best regards
Thomas

Is it also possible to change the Labels of the per example ‘Add’ Buttons just at one place?
My application should be in germam language, but on all buttons, there are english labels

Thomas

Hi,

Yes it is. See this guide for more information: https://www.cuba-platform.com/guides/localization-in-cuba-applications

Bye
Mario

1 Like