How do I extract localized values of the string enumeration into the report?

Hello Colleague.
Subj.
Regards, Alex.

Perhaps something like this:

def messages = applicationContext.getBean(Messages)

MyEnum.values().each {
    def message = messages.getMessage(it)
    // ...
}

@krivopustov This only works in Groovy datasets for bands, because ApplicationContext is passed there.
And if you use a JPQL dataset, then the solution is unclear.
There is no ApplicationContext in Groovy formatting of the value.
Related topic in the Russian forum