Setting default locale/region in Nextcloud/OnlyOffice

Questions/problems on Docker
Post Reply
nikkilocke
Posts: 3
Joined: Mon Nov 04, 2019 3:18 pm

Setting default locale/region in Nextcloud/OnlyOffice

Post by nikkilocke » Mon Nov 04, 2019 3:44 pm

I have a Nextcloud server installed. I have set the default locale to en-gb in the config.php file, this

Code: Select all

  'default_locale' => 'en_GB',
In my Nextcloud personal settings, I have language and local set to English (United Kingdom).

OnlyOffice runs in a docker container. I have copied out

Code: Select all

/var/www/onlyoffice/documentserver/web-apps/apps/api/documents/api.js
and edited it. In there, there seem to be 2 commented out definitions of config, but nevertheless I edited both of them to read thus:

Code: Select all

            type: 'embedded',
            width: '100% by default',
            height: '100% by default',
            documentType: 'text' | 'spreadsheet' | 'presentation',
            document: {
                title: 'document title',
                url: 'document url',
                fileType: 'document file type',
                key: 'key',
                vkey: 'vkey'
            },
            editorConfig: {
                licenseUrl: <url for license>,
                customerId: <customer id>,
                autostart: 'document',    // action for app's autostart. for pre
sentations default value is 'player'
                region: 'en-GB',
Below those commented sections, I found a number of statements which set values in _config, and I added one to set the region thus:

Code: Select all

        _config.frameEditorId = placeholderId;
	_config.editorConfig.region = 'en-GB';
I copied this back into the docker container, stopped and restarted it.

Nevertheless, when i create a new document in Nextcloud, the language comes up as English (United States).

How can I fix this, please?

Andrew
Posts: 101
Joined: Mon Apr 01, 2019 1:09 pm

Re: Setting default locale/region in Nextcloud/OnlyOffice

Post by Andrew » Tue Nov 05, 2019 8:28 am

Hello nikkilocke,

If you open document from Nextcloud using Document Server it sets same language as in Nextcloud config. Do you want to have en-GB language in Nextcloud and different language in Document Editors interface by all these manipulations? Explain your goal in more details please.

nikkilocke
Posts: 3
Joined: Mon Nov 04, 2019 3:18 pm

Re: Setting default locale/region in Nextcloud/OnlyOffice

Post by nikkilocke » Fri Nov 08, 2019 8:11 pm

I just want the whole thing to be in English (United Kingdom). Especially when I create a brand new document (or spreadsheet).

Andrew
Posts: 101
Joined: Mon Apr 01, 2019 1:09 pm

Re: Setting default locale/region in Nextcloud/OnlyOffice

Post by Andrew » Tue Nov 12, 2019 9:35 am

We found an issue which you mentioned, it will be fixed in next Nextcloud connector version and if you set English (United Kingdom) locale and language in it it will be same in ONLYOFFICE editor. Thank you for report and sorry for temporary inconvenience concerning this problem. We got same test results in Owncloud and fix for it also will be available with new connector version as soon as possible.

Post Reply