Page 1 of 1

How to set the language of the validation messages ?

Posted: Wed Aug 09, 2023 3:10 pm
by Vince
Hello,

In Web Author, we want to display valdation message using the language specified by the URL parameter lang.
But this parameter has no effect.

Note that, now, we set the language setting the default locale for JVM :

Code: Select all

public class MyBundle extends ExtensionsBundle {
    static {
        try {
            Locale.setDefault(new Locale("fr", "FR"));
        } catch (Exception e) {
            LOGGER.warn("Could not set locale : ", e);
        }
    }
Do you have another better solution ?

Regards,
Vincent

Re: How to set the language of the validation messages ?

Posted: Thu Aug 10, 2023 11:36 am
by Bogdan Dumitru
Hello Vincent,

Try using the "Schematron_custom_language" and "Schematron_language_option" configuration options.
Read more about them in the Configuration Options topic.

Re: How to set the language of the validation messages ?

Posted: Thu Aug 10, 2023 3:57 pm
by Vince
Thanks,

These options are applied for all Web Author users..

Is there a way to define messages language by user ?

Regards,
Vincent

Re: How to set the language of the validation messages ?

Posted: Fri Aug 11, 2023 11:57 am
by Bogdan Dumitru
Hello Vincent,

There might be a possible way to achieve this.
1. Try setting the "Schematron_language_option" integer option to 3. This way the validation errors will be generated for all languages
2. Add a ro.sync.exml.workspace.api.editor.validation.ValidationProblemsFilter and filter extra languages. Here you can see a sample plugin that might help you understanding how to use this extension.