LibreOffice spell-chek with custom sanskrit terminology dictionary in english / multi-language document not working

I am frequently working on documents written in english or finnish language, while having terminology in sanskrit (using IAST sanskrit transliteration). I have created a custom dictionary “Sanskrit IAST.dic” with the sanskrit terminology. When navigating Tools/Options/Language & Locales/Writing Aids/User Defined Dictionaries, the “Sanskrit IAST.dic” file is visible, and by clicking “Edit” the dictionary corrently opens for editing.

When I have my document open, and if I have selected the document language as “English (USA)” or “Finnish” and run the spell check, it will not use the “Sanskrit IAST” dictionary, but underline the sanskrit words with the red wavy underlining indicating that as per “English (USA)” dictionary, the word is misspelled. If I right-click the word to see spelling suggestions, it will display them from the “English (USA)” dictionary, completely ignoring my custom “Sanskrit IAST” dictionary.

Then I tried select all (Ctrl+a), Character/Font/Language to [none], then all the red wavy underlines disappear, and there are no spelling suggestions at all.

It seems that either I can’t comprehend how to make this working - or, this function is broken. Is this the inteded behavior?

How can I get it to spell-check my sanskrit terms in english language or finnish language document? Should I instead copy all the sanskrit terms to “standard.dic”?

Version: 24.2.7.2 (X86_64) / LibreOffice Community Build ID: 420(Build:2) CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3 Locale: fi-FI (fi_FI.UTF-8); UI: fi-FI Ubuntu package version: 4:24.2.7-0ubuntu0.24.04.3 Calc: threaded

Create a paragraph style and a character style with language set as Sanskrit. Apply the paragraph or character style to the Sanskrit parts of the documents depending on whether they are paragraphs or within a paragraph.

Similar to this example where a new paragraph style Text Body Latin is being set up to have Latin as its language.

Thank you for these suggestions. However, what you suggest doesn’t work: LO does not have Sanskrit available as a language. And it doesn’t seem possible to add a custom language.

Secondly, the document is written in Finnish or English, and I need spell check to be active for those languages. It is only particular Sanskrit terminology which is being used throughout the entire Finnish or English document. In the same way as a doctor would be writing a scientific medical article in English, but would be using medical terminology in Latin in it.

I would like to have the paragraph language / paragraph style / character language / style set to the actual language, in which the document is written, and then have the terminology dictionary activated for spell-checking the specific Sanskrit terms within it. Seems that it is not doable?

So am I right to conclude, that this is not possible in LO? Is it that LO does not support documents/paragraphs written in two or more languages? It has to be either one or the other? And LO does not support Sanskrit as a language?

Some work seem to have been completed towards adding Sanskrit to LO:

No, but your intended way of use is different from the idea LO uses.
.
For your way to use you would not create a dictionary for sanskrit, bu an secondary dictionary “my-english-extension-sanskrit” like we do for special terminology. You would also need to copy this data to an identical “my-finnish-extension-sanskrit”. LO will not “know” this parts are sanskrit when you use this way.
.
LibreOffice works the other way round: You mark text as being in a certain language. The usual place to set this is a paragraph style, and together with a direction for the style to used next one can quite easily switch between languages. The spell-checker will use the according dictionary, if it is installed/found. What is needed for this is only a code to define the language (like en-us, en-uk etc), but I read this exists even for clingon language from Star Trek.
Edit: Use character-styles when there are single words/sentences inside a paragraph.
.
Advantages:

  • You only need one sanskrit dictionary usable from english and finnish documents. (But you may still need sanskrit traditional and “modern”).
  • One can also set the Language to “none” to prevent spell check from checking text. (Example: When you show wrrite papers on md5 or sha-checksums or cryptology.)
    .

What you found there is on the translation of the user-interface. But I guess you don’t need your menus in sanskrit as used in india, sa-in.

Check this extensions (EDIT: Corrected link)

There is effectively no Sanskrit module in LO. But even if you can’t tag a sequence as “sa” or “san”, you can cheat Writer.

Tag your styles (paragraph and character) with an existing language you don’t use.

Not knowing how Writer will react to such an abuse, I’d suggest to tag with a language in a close script, like one of the languages used in India.such as Gujarati, Hindi, Malayalam, … (Hindi is probably the closest). Don’t load the language pack. Install your terminology dictionary as the standard one for this language.

1 Like

No. The correct link for Sanskrit Spell check is:

Please share your word list so that it can be replaced / merged into this.

Thank you. I don’t know why my search found the one on ‘update…’ but as the link lead to LibreOffice.org, it was ok for me. I will update my post.

I meant there is currently no “official” language code assigned to Sanskrit Writer language, which would have solved the problem. Your link points to an extension, i.e. a community/third party development, without guarantee from TDF.

I haven’t installed the extension to see how it is implemented. If the author used the ISO 639-1 alpha-2 code, it is perfect. Otherwise, my surrogate is a cheating workaround.

Sanskrit is supported by Libre Office since a very long time.

1 Like

I don’t think so. I am under 24.8.5.2 without extensions. I enabled Complex text layout and despite that, Sanskrit does not appear in the drop-down menus.

I guess that extension developers did a nice job by integrating smoothly their sa spell-checker in Writer.

Then, all you have to do is configure Language attribute adequately in your paragraph and character styles.

Very surprising.

Can you try to create a new custom dict for Sanskrit just like english? (Tools - Spellings - Options - New… - Language - Sanskrit) Once the custom dict is ready, click on Edit… button to add a word from Sanskrit wikipedia. You can also open the file directly and add hundreds of words. You will find the file in “wordbook” folder of your user profile.

I can’t. The Language menu in the dialog is dependent on global language configuration. I can’t add a new unconfigured language from scratch. I suspect the extension you mentioned does quite a thorough job, adding Sanskrit to the list of recognised languages.

I removed the extension before testing and will test again after reinstalling LibreOffice.
Could someone following this discussion kindly test it as well and share their results?

I am happy to test.

Shantanuo, in which script is used by the Sanskrit Spellchecker dictionary file? I suppose unicode compliant, maybe Devanagari or IAST? I suppose not non-unicode formats like ITRANS or Harvard-Kyoto?

I was wondering whether the Sanskrit Spellchecker is script-independent, or it works only with devanagari. But on github repository I found already answer to my question:

dict-sa-Latn.zip
dict-sa-Deva.zip
dict-sa_IN.zip

Most of the words mentioned in your file are already in the Sanskrit extension mentioned above. (Post ID 6) Only Devanagari is supported by that extension.

A few words are missing for e.g.

अष्टाशीत्यांश अष्टोत्तरशतांश आलोचक उदकवह क्लेदक खवेदांश गोछर चतुर्विंशांश जोस्त तर्पक नक्षत्रांश पञ्छ पादाङ्गुलि विंशांश श्लेषक षष्ठषष्ठांश षष्ठ्यांश

You need to add them to your custom dictionary. The steps are mentioned in my last reply (Post ID 11)

On a parallel installation of 25.2.1.2 and on 6.4.7.2 I see Sanskrit in the list of languages under Complex. My mistake was to show a screenshot using Western font.

1 Like