Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language matching when set from API-call #339

Closed
ffes opened this issue Apr 7, 2024 · 2 comments
Closed

Language matching when set from API-call #339

ffes opened this issue Apr 7, 2024 · 2 comments

Comments

@ffes
Copy link

ffes commented Apr 7, 2024

The languages I have downloaded and installed are en_US and nl_NL. But the sources I have to set the language only provide en or nl.

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.* to en.* 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 as en_US.

@ffes
Copy link
Author

ffes commented Apr 8, 2024

Another work-around could be to iterate through NPPM_GETPLUGINSCONFIGDIR/Hunspell/*.dic to see what languages are available.

@Predelnik
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants