Adding new language to spellcheker language list


It is possible to write an extension for LibreOffice Writer that modifies the language list used for spellchecker to add a new language/variant of a language?
I saw that in the language list there is Greek and Greek, Ancient available. I want myself to add a new Ancient vairant to my own language through an custom extension.
What do I have to do to accomplish the task?

I will provide myself dictionaries and whatever neccesary to implement my spellchecker afterwards.