i18n messages not translated in headless client

Hi guys,

We have recently noticed a problem in using i18 messages when calling hedlessclient. It seems that the i18n messages do not get translated when running the application from headless client and this causes a lot of issues for us as we try to have everything possible as an i18n value.

The problem is that we use servoy hedlessclient for our API calls and all the api functions call our internal functions which might use i18n messages in so many different ways such as searching for a specific value. This will cause the api function to return a wrong value or even fail in some situations where the i18n message is used and headlessclient can not process it as expected.

Can anyone from Servoy confirm that this is a bug or we are missing something?

Cheers,

i18n should just work for the headless client.
Are you sure that the i18nDataSource is set for the solution that you use?
And do you get the expected language when you run i18n.getCurrentLanguage()? You might need to set the locale using i18n.setLocale().

I would advise to not have your logic depend on translated values though. It is not robust, as you found out ;)

Hi Jaos,

Thanks for your message. I just realized that the module that had the problem of translating i18n messaged didn’t have the i18n messages table assign to it and that’s why it couldn’t see it :?

Problem solved :)

Cheers