Bug 130110 - lang parameter of loleaflet.html
Summary: lang parameter of loleaflet.html
Status: RESOLVED MOVED
Alias: None
Product: LibreOffice Online
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-21 12:59 UTC by Andras Timar
Modified: 2023-01-19 01:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Timar 2020-01-21 12:59:28 UTC
I tested Nextcloud integration but the problem is general. We need to distinguish language variant and locale.

Steps to reproduce:
* Set Nextcloud language to English (US)
* Set Nextcloud locale to Swiss German
* Open spreadsheet in Collabora Online from a template with Swiss German spell check language

Expected results:
* Collabora Online UI (e.g. menu bar) is in English
* Collabora Online spell check is in Swiss German
* Collabora Online local (e.g. cell format) is in Swiss German

Actual results:
* Collabora Online UI (e.g. menu bar) is in English
* Collabora Online spell check is in Swiss German
* Collabora Online locale (e.g. cell format) is in English

Nextcloud passes lang=en-ch which is weird (English as spoken in Switzerland?), but Online falls back to en-US presumably. 

Another example:
* Set Nextcloud language to English (US)
* Set Nextcloud locale to English (UK)

Nextcloud passed lang=en-gb. The Online JavaScript UI changed to en-GB (e.g. "Colour") but tunneled dialog still came in en-US (e.g. "Color").

Another example:
* Set Nextcloud language to Portuguese (Brazil)
* Set Nextcloud locale to Portuguese (Portugal)

Nextcloud passed lang=pt-pt unexpectedly, thus the UI turned into Portuguese (Portugal). 

So on Online side, there should be a better interface.
* Existing lang parameter should expect a BCP 47 language tag or something similar for UI language of Online (both js and tunneled stuff from core).
* There should be a new locale parameter and integrations should use it.
Comment 1 Andras Timar 2020-01-22 21:40:27 UTC
I filed https://github.com/nextcloud/richdocuments/issues/795 for the Nextcloud part. 

But even if that is fixed, we are not done. In desktop LibreOffice we can set the UI language, the locale, and the default currency. 

In LOKit we have a single "Language" parameter to pass when we load a document, and UI language and locale are set to the same value. 

So, if the requirement is - for example - to have English (US) user interface but German (Switzerland) default number format in Calc, then we need to change the LOKit API, and also change loleaflet, to take an optional "locale" parameter from integrations.
Comment 2 Michael Meeks 2021-01-07 15:53:51 UTC
This is in our pm-ranking still; the Richdocuments part is ~fixed and merged:

https://bugs.documentfoundation.org/show_bug.cgi?id=130110

Andras: can you either close this and move the pm-ranking item to Completed - or re-file what is left as a Phab ticket, link it into pm-ranking and close this =)

Thanks !
Comment 3 Aron Budea 2023-01-19 01:42:58 UTC
This can be considered moved.