Page 1 of 1

DocumentServer: Changing default document language

PostPosted: Fri Mar 09, 2018 8:45 am
by mmeyer
I am using the DocucmentServer.

When a new document is opened the language of the document and of the spellchecker are always set to "English (United States)".
Having to change this each time a new document is opened is very cumbersome.

Is there a way to set the language per document? E.g by
- Using the javascript api? (https://api.onlyoffice.com/editors/config/)
- By setting a parameter in the documentUrl? https://api.onlyoffice.com/editors/config/document#url
- By setting a header attribute in the documentUrl? https://api.onlyoffice.com/editors/config/document#url

Or can I at least change the default document-language and spellchecker-language in a config file?

Note: I already changed the language of the editor using https://api.onlyoffice.com/editors/config/editor#lang

Regards,
Michael

Re: DocumentServer: Changing default document language

PostPosted: Fri Mar 09, 2018 10:55 am
by Maxim
Hello mmeyer!
You need to change the example doc file. When you create a doc it means that document server opens an example empty file.

Re: DocumentServer: Changing default document language

PostPosted: Mon Mar 12, 2018 5:07 am
by mmeyer
Hello Maxim

Thanks for the reply.

I wasn't aware that OnlyOffice was able to read the language from the document metadata.
When opening a word document with language set to de_CH the OnlyOffice editor sets the language correctly. Nice!

Unfortunately the language of the spellckecker is still "Engish (United states)".
It would be nice if the spellckecker would use the document language by default.
(Being able to set the default spellchecker language in the editor configuration would also be an acceptable solution).

Is this possible?

Regards,
Michael