How to set the language of the validation messages ?

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
Vince
Posts: 64
Joined: Wed Dec 03, 2014 11:25 am

How to set the language of the validation messages ?

Post 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
Bogdan Dumitru
Site Admin
Posts: 142
Joined: Tue Mar 20, 2018 5:28 pm

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

Post 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.
Bogdan Dumitru
http://www.oxygenxml.com
Vince
Posts: 64
Joined: Wed Dec 03, 2014 11:25 am

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

Post by Vince »

Thanks,

These options are applied for all Web Author users..

Is there a way to define messages language by user ?

Regards,
Vincent
Bogdan Dumitru
Site Admin
Posts: 142
Joined: Tue Mar 20, 2018 5:28 pm

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

Post 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.
Bogdan Dumitru
http://www.oxygenxml.com
Post Reply