This is a follow-up to https://ask.libreoffice.org/t/working-with-different-language-documents/81898/ LO offers the possibility to separate UI language (menu, toolbars, …) from document language (both set in Tools>Options, Language Settings>Languages). It is then expected that any action on text will be done according to document language. This is correct for spell/grammar checking as document language "drips down" to Default Paragraph Style, then to all dependent paragraph styles. However, this does not work when "synthesised" data is inserted into the document, as in the case of `Insert`>`Caption`. Captioning is driven by a dialog, hence this dialog is displayed in the UI language. But the Category drop-down menu also shows strings in the UI language whereas they should be in document language because this is where they will be inserted in the end. Ideally, they should be in the insertion-position language but it is very difficult to determine which language to use in a multi-lingual document, though we can expect that captions will all be in document language for consistency. I admit that language packs may not be installed as they are not necessary to type a document in any language. Language packs are only mandatory to change UI language. Without language packs, we lose functionality like spellchecking but this doesn't prevent from typing. So, captioning should try to "translate" the Category string if language pack is present and revert to UI language or en_US in last resort. No sample file attached because the result depends on one's computer configuration not on the document. Step to reproduce: - configure LO fur different UI and document languages 1. create a new Writer document 2. Insert>Frame (any will do as we only caption it, just make it wide enough) 3. Insert>Caption Result: Caption category is in UI language Expected result: Caption category in document language Version: 7.3.6.2 Build ID: 30(Build:2) CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb) Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: threaded
I confirm the described behaviour, but I don't see a big problem here, because you can add category in document language just with typing. This category is default category for all frames and is also available as category for captions in images. And you've also mentioned the problem of docments with mixed languages. Anyway, it's more an enhancement request than a bug. So let's decide design-team cc: Design-Team for further input and decision.
(In reply to Dieter from comment #1) > you can add category in document language Of course, but this is already considered advanced usage. This is the simplest solution to the problem but, since it requires some configuration, it is not immediate for newbies. I submitted the report on behalf of a user asking on AskLO. Personally I would not mind if it is RESOLVED-WONTFIX/NOTABUG, your comment having reminded me about category customisation.
(In reply to ajlittoz from comment #2) > (In reply to Dieter from comment #1) > > you can add category in document language > > Of course, but this is already considered advanced usage. This is the > simplest solution to the problem but, since it requires some configuration, > it is not immediate for newbies. Yu only have to recognize, that you can type in category field. I wouldn't call this a "configuration". And even help says: "Select the caption category, or type a name to create a new category." https://help.libreoffice.org/7.4/en-GB/text/swriter/01/04060000.html?System=WIN&DbPAR=WRITER&HID=modules/swriter/ui/insertcaption/dialog-action_area1#bm_@@nowidget@@ Reading help page should always be possible.
I cannot follow. My UI is in English (USA), document default for western is English (UK). New documents adopt en_UK for the Default PS, which is taken into captions. When I change the language for the Default PS to Esperanto, the language attribute for inserted captions will be Esperanto.
(In reply to Heiko Tietze from comment #4) > I cannot follow. Steps: 1. Set UI to English and document language to a different one (for example German) 2. Insert image or shape 3. Insert -> caption Actual result: Categories are in UI Language Expected result: Categories are in document language (Can't say, what's the expected result in document with mixed languages).
Created attachment 182899 [details] Screenshot Caption is German when I set German as default language for western documents.
(In reply to Heiko Tietze from comment #6) > Created attachment 182899 [details] > Screenshot > > Caption is German when I set German as default language for western > documents. I think there is a misunderstanding here. "Drawing" is not a German word. I would expect "Zeichnung" in the "Insert Caption" dialog.
Created attachment 182900 [details] Screenshot UI German, Document English Here a screenshot with German UI language (turning the default name of the caption into the German translation) and English document language. The language of the caption is English, following the Default Paragraph Style.
Sorry Heiko, but I'm loosing ideas, how to explain it. One more try: UI: English Default document language: German Language of default PS is German. Category is by default "Drawing". PS is "Drawing" with language German. But I hope, you agree, that "DRAWING" is not a German word. So I don't discuss about PS, but only about the words of the categories, that are shown in the dialog and then within the document. They should follow the document language.
Maybe I've read too many tickets about the assigned language. Anyway, the "document language" coming from tools > options is applied to the Default PS and subordinate PS, and should be used for the category labels. Using the PS language means to get on one paragraph "Drawing" and on the other "Zeichnung". Makes not much sense to me. And hard to imagine that generating a ToC for both names is possible and meaningful. But using the UI language as today is also not a good solution. So the question boils down to what the "document language" is. Perhaps we always take what is define in tools > options and ignore the setting in PS/CS, which is rather meant for spellcheckers. Alternatively, overwriting the category with "Ilustración" is very simple and does the trick, as Dieter commented in c1.
(In reply to Dieter from comment #1) > but I don't see a big problem here It's not a big problem, but it is _a_ problem, so setting this to "minor" rather than "enhancement". > So the question boils down to what the "document language" is. (In reply to ajlittoz from comment #0) > LO offers the possibility to separate UI language (menu, toolbars, …) from > document language (both set in Tools>Options, Language Settings>Languages). Tools>Options, Language Settings>Languages doesn't set the document language, and, in fact, doesn't even set the _default_ language. How come? Suppose you choose English for the Western language group (LG) and Arabic for the RTL-CTL LG. Which of these is the default document language? Not clear. > Ideally, they should be in the insertion-position language but it is very > difficult to determine which language to use in a multi-lingual document, Why? We have an indication for this right now in the bottom status bar... (In reply to Heiko Tietze from comment #10) > Anyway, the "document language" coming from tools > options is applied to > the Default PS and subordinate PS, and should be used for the category > labels. See my comment above about that. Also - do you mean PS as in Page Style, or Paragraph Style? The Page Style dialog does not have a language setting/indication anywhere. > So the > question boils down to what the "document language" is. Perhaps we always > take what is define in tools > options and ignore the setting in PS/CS, > which is rather meant for spellcheckers. Nope, we need a proper document language. Does the ODF spec have one?
This topic was on the agenda of the design meeting but did not receive further input. The proposal might work in some scenarios but could be unwanted in other. Changing the string is very easy. Let's keep the ticket.
Well, apparently, we currently don't even have a document language, so it is impossible to set captions to the "document language". On the other hand, we could in principle have one, according to the ODF spec - but ignore that. See bug 151906 for a discussion of this mess.