Page 1 of 1

Force the language to english and the display mode to full tags

Posted: Thu Mar 18, 2021 6:37 pm
by Alper B
Hi,

I would like to force the use of the english language in the toolbar and the error or validation messages.

To do this, I tried different keys in my options.xml file ("appearance.language.set", "appearance.language, "CURRENT_APPLICATION_LANGUAGE"), trying to limit the available languages ​​to English for example.
I also tried a VM argument "-Dcom.oxygenxml.language=en" without success. On the other hand, "-Duser.language=en" allows to change the locale, but the user preferences always take precedence.

I would also like to set the display mode with "full tags" by default. I tried the option "tagless.editor.tags.display.mode" but it doesn't do the job.

Best regards,

Alper.

Re: Force the language to english and the display mode to full tags

Posted: Mon Mar 22, 2021 10:03 am
by Radu
Hi Alper,

I do not understand the use case for the first request. So when Oxygen is installed the end user chooses the language of the user interface and then they get to change it if they want from the Preferences->"Global" page. Why do you want to remove this flexibility?
You state you have an "options.xml" file. How do you provide it to Oxygen? Via a plugin or as a default XML options file?
You mentioned you set the system property "com.oxygenxml.language" to "en" as a VM parameter. How exactly did you do this?

About this second request:
I would also like to set the display mode with "full tags" by default. I tried the option "tagless.editor.tags.display.mode" but it doesn't do the job.
please give me more details about how you tried to set the option (from a plugin or in a default XML settings file) and to what value you attempted to set it.

Regards,
Radu

Re: Force the language to english and the display mode to full tags

Posted: Mon Mar 22, 2021 2:06 pm
by Alper B
Hi Radu,
Why do you want to remove this flexibility?
Because the english will always be used and there are too many languages ​​available to the user in the preference menu.
You state you have an "options.xml" file. How do you provide it to Oxygen? Via a plugin or as a default XML options file?
The "options.xml" is provided as a default XML options file.

The VM argument "-Dcom.oxygenxml.language=en" was set in the Tomcat Server VM options in my IDE. But the local is now set to English with the VM argument "-Duser.language=en". We just want to know how to modify the list of languages ​​available in the preference menu.

About the second request, my try was in a plugin, with a WorkspaceAccess type extension, at the application start:

Code: Select all

WebappPluginWorkspace ws = (WebappPluginWorkspace) pluginWorkspaceAccess;
        ws.setGlobalObjectProperty("tagless.editor.tags.display.mode", "4");
I tried the value 4 but I do not know which numbers correspond to the different type of display mode.

Regards

Re: Force the language to english and the display mode to full tags

Posted: Mon Mar 22, 2021 2:42 pm
by cristi_talau
Hello,

The global options you tried to set are just controlling the defaults. User preferences take precedence.

To override the user preferences you can use the following URL parameters when opening Web Author:

Code: Select all

&tags-mode=full-tags-with-attributes&lang=en
The "tags-mode" parameter can also be passed as a LoadingOption [1].

Please let me know if this customization approach works for you.

Best,
Cristian

[1] https://www.oxygenxml.com/doc/versions/ ... cepts.html

Re: Force the language to english and the display mode to full tags

Posted: Mon Mar 22, 2021 6:29 pm
by Alper B
Hi Cristian,

Both solutions are good.

Thanks for your help!

Regards