How do I change the default language in Collabora?

When installing Nextcloud with Collabora you have the option to choose dictionaries that can be used in Collabora. The problem is that when you create a new Collabora document, the default language of the document is always ā€˜Germanā€™, independent of what languages you chose.

For a long time the solution to this issue has been changing the template files in the core/templates/filetemplates folder as is explained in this topic:

But this solution is not working anymore, as you can see in that topic. So I open a new topic to raise this issue again, in search for a new solution. Does anyone have ideas?

All the best,

P.S I installed Collabora & Nextcloud using this playbook: GitHub - ReinerNippes/nextcloud_on_docker: Run Nextcloud in Docker Container on various Linux Hosts . Those all update to the latest versions (NC16.0.1).

2 Likes

The issue is also raised in the Nextcloud repo:

Yesterday I installed Collabora and indeed noticed the default language in new documents to be German. Searching for a solution led me here. Since the file path mentioned in various conversations did not work I did a search for such templates in the nextcloud tree om my server.
It seems that now the Collabora app installs its own templates in the apps/richdocuments/assets/ subdirectory. I made English templates with LibreOffice on my desktop and copied these to that subdirectory on my cloud server and that solved the issue, at least for me.
Hope this info is useful for someone.

EDIT: Oviously the above is not fully clear so I put templates in bold to emphesise that they are not the normal document formats as sciencedeeply mentions below.

2 Likes

@haro Thanks. Your solution was the right one for me.

But I wonder why this is managed this way.
How do we do when you need several languages, depending on the person whoā€™s using Lool.

Why not detect the preferred browser languages or the nextcloud webui language of the user and use it first.

And if not set then use a default template.

@quenenni You are right and I do not know why the current setup was chosen.
Providing templates for all possible languages in the app itself is not doable. Ideally a language neutral template should be provided which could complete itself once the user chooses the preferred language when opened on LibreOnline. That way the user can select the language preferable for that document and only be limited by the lanuages installed in LibreOnline.
Another option might be that the installer has a section where the admin is informed that such templates need to be provided in the various languages desired and where to store them.
Either way, as I am not involved the development of these tools, I do not know where it will go.

Unfortunately, this isnā€™t working for me.

I have tried replacing /assets/odttemplate.odt/ and /assets/template.odt/ with versions saved with English (UK), But still, every new document is opening with default English (US).

I have my personal language set to English (British English).

It is weird, because only New Document.odt defaults to English (US). Both, New Presentation.odp and New Spreadsheet.ods default to English (UK)!

Hopefully someone can figure something out.

Onlyoffice defaults to using personal language, but it lets British English default to US! Replacing the files in /apps/onlyoffice/en/ with files from /en-GB/ sorted that out (after importing that folder).

Ok I found the solution.

I created a new document.odt and opened it with Collabora. I changed the language and then saved it. I then moved that document to /data/appdataā€¦/richdocuments/empty_templates/document.ott (yes .ott, not odt).

Hope this helps someone.

2 Likes

Hi, Iā€™d like to sort it out too, NC 18.0.2 and collabora latest version.

I find no /data/appdataā€¦/richdocuments/empty_templates/ directoryā€¦ :thinking:

For text docs, I can find:
./core/templates/filetemplates/template.odt
./core/skeleton/Documents/Example.odt
./apps/richdocuments/assets/odttemplate.odt
./apps/richdocuments/assets/document.ott
./apps/richdocuments/assets/template.odt

For spreadsheets:
./core/templates/filetemplates/template.ods
./apps/richdocuments/assets/template.ods
./apps/richdocuments/assets/spreadsheet.ots

For presentations:
./core/templates/filetemplates/template.odp
./apps/richdocuments/assets/presentation.otp
./apps/richdocuments/assets/template.odp

Itā€™s quite a lot of ā€œtemplatesā€ for so few document typesā€¦

When I open a new spreasheet, the default language isā€¦ French!
Fine, this is my language. Probably due to something I did, it was English US before. Iā€™ve been working on /apps/richdocuments/assets and /core/templates/filetemplates. Canā€™t say which one was the good one though.

But I did the same for the other templates, I mean text docs and presentation, andā€¦

When I open a new text doc, the default language isā€¦ English US. And it is English UK for a new presentation.

At this point, I just donā€™t understand what template is used in each case and it looks quite messy, isnā€™t it? :stuck_out_tongue_closed_eyes:

OK, so I downloaded all these files, changed the different default languages to mine in all of them, uploaded them back to their locations on the server andā€¦

  • A new Document odt is in my language ; :grinning:
  • A new Spreadsheet ods is also in my language ; :crazy_face:
  • A new Presentation odp is in English UK! :rofl:

[EDIT]
Just did the exact same thing on another NC/Collabora instance, same versions and all, and the new Document (odt) has here German as default language! :woozy_face:

[EDIT 2]
Back to the 1st instance, logged in as ā€œsomeone elseā€, new odt in English USAā€¦ :cowboy_hat_face:

Wrong path!

Check this other thread where I just wrote that I think I found a way to change templates default settingsā€¦