Closed ffes closed 3 months ago
Another work-around could be to iterate through NPPM_GETPLUGINSCONFIGDIR/Hunspell/*.dic to see what languages are available.
I think providing list of languages is the easiest way, it's a bit annoying to do with C API though, wonder if C++ API would be suitable as well.
The languages I have downloaded and installed are
en_US
andnl_NL
. But the sources I have to set the language only provideen
ornl
.So when I parse the sources I have, I only have the two char language code and not the 5 char that is needed. For now I renamed the Hunspell files from
en_US.*
toen.*
to make it work and did the same for the Dutch language files.I see two possible solutions.
Either have a extra message to get all the available languages. This way the plugin that wants to set the language can do its magic to make sure the language is set.
Or when the message is sent to DSpellCheck, DSpellCheck should do the magic and recognise that
en
is the same asen_US
.