4

For a very specific reason, I want to have a custom language. For example, since my name here is JSV, this language should be called JSV.

Is it possible at all? And how?

I suppose that it will be easier to create it by altering one of the existing ones, for example, English:

C:\Program Files\LibreOffice\share\extensions\dict-en\...

But how exactly?

Brandon
  • 269
  • 1
  • 9
user90726
  • 873

1 Answers1

6

It is possible to add new languages in LibreOffice 5.3 and later. There is a command line program called oxttools that creates an .oxt for a language. When the .oxt is added to LibreOffice, XML files are added that describe the language for spell checking and other language functions.

It expects a language tag, and there is no existing JSV tag. However there is "jsl" (normally for Japanese Sign Language). So what you can do is use "jsl" as the tag and then "JSV" as the language name, which is what will be visible in LibreOffice.

language in the character properties dialog

If you want to try this, here is the powershell command I used for this test.

& ./makeoxt -d wordlist.txt -l "JSV" -t west jsl out.oxt

Disclaimer: I am associated with the people that develop oxttools and have contributed code to the project. However it is free, so I am not profiting by advertising it or anything like that.

Jim K
  • 4,029
  • Amazing. Thank you so much. (I haven't tried it yet. I will try it right now.) – user90726 Dec 29 '21 at 22:36
  • Jim, I have just tried to run makeoxt.exe on my Windows 7. It seems the program requires 64-bit Windows, right? – user90726 Dec 29 '21 at 22:56
  • 1
    Yeah, maybe so - I am on Win10 x64. Download the source code instead. To run the source code, you will need to install the lxml python library, which can sometimes be tricky. – Jim K Dec 29 '21 at 22:59
  • 1
    Or you could install https://extensions.libreoffice.org/en/extensions/show/lingtools. Then go to Linguistics -> Build Extension for Language. This is a dialog wrapper around oxttools that does not require lxml. – Jim K Dec 29 '21 at 23:05
  • The extension works, thanks! One more question: is there a list of available language tags that you talked about? I searched for it in the oxttools documentation, but it simply provides two examples, without any futher explanations. – user90726 Dec 29 '21 at 23:33
  • 1
    https://www.ethnologue.com/browse/codes – Jim K Dec 30 '21 at 08:34