Thomas Carlton
Thomas Carlton

Reputation: 5968

How to translate default error messages in Apex?

I have an Oracle Apex Application, enter image description here

I need the application to be in French. I set the language in Application Primary Language as French (See screenshot) and Application Language Derived From Application Primary Language.

Most of the default messages are in now in French but few of them are still in english. For example If I have a page item with a validation check. Let's say ItemX should be between 0 and 10, if the validation fails, I got the message in english saying : ItemX is not between the valid range of 0 and 10.

Does anyone know how to solve that please ?

Thanks. Cheers,

Upvotes: 2

Views: 1969

Answers (2)

TineO
TineO

Reputation: 1033

Individual validations have different texts. When you set a validation, you can then also set the error text, by default it will be something in english.

You might have to go through your entire application, find every validation and check and correct its text.

If you have a lot of similair validations you might be able to do a dynamic translation of the text, but I havent played around with this yet.

One thing I also like to do is set an error handling function that renames the errors. You sometimes get errors from the DB, not from the page, maybe if you break a unique key or try to delete a parent with children. So I built an error handling function that takes the error, and if its one of the ones I wish to rename(-2292 for example, this one is if you try to delete parent whilst there are still children), it changes the returned message into something understandable to the end user and in my language.

Upvotes: 1

Littlefoot
Littlefoot

Reputation: 142705

Lucky me, I don't have such problems.

Anyway, I'd say that Translating Messages's chapter 18.4.2.1 (Creating Text Messages) and - even more - About Internal Messages Requiring Translation that contains message you mentioned in the question

  • APEX.DATEPICKER_VALUE_NOT_BETWEEN_MIN_MAX
  • #LABEL# is not between the valid range of %0 and %1

might be what you're looking for.

Upvotes: 2

Related Questions