Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Mixed Language Support #103

Open
ccorcos opened this issue Oct 15, 2018 · 4 comments
Open

Mixed Language Support #103

ccorcos opened this issue Oct 15, 2018 · 4 comments

Comments

@ccorcos
Copy link

ccorcos commented Oct 15, 2018

It would be really sweet, if this library (as well as electron.webframe.setSpellCheckProvider) supported mixed languages. Chrome does a really good job with this already.

@dmoonfire
Copy link
Contributor

What do you mean by mixed language? Using English and German at the same time? That functionality is part of the locales setting in the main configuration (you can put the simplified IEFT tag as a comma-separated list). Or is it a specific handling of different languages?

@ccorcos
Copy link
Author

ccorcos commented Oct 15, 2018

Interesting, so this would supposedly work?

const { webFrame } = require('electron')
webFrame.setSpellCheckProvider('en,de', true, {
  spellCheck (text) {
    return !(require('spellchecker').isMisspelled(text))
  }
})

@dmoonfire
Copy link
Contributor

Sorry, I was thinking of the other spell check. When using this library, you can create two instances and point each one to a different dictionary file. Then you can check one and then the other. It doesn't use webFrame at all, mainly because it was written as a standalone app (direct in node).

@ccorcos
Copy link
Author

ccorcos commented Oct 16, 2018

I see. spellchecker.setDictionary and then spellchecker.isMisspelled for each language.

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

No branches or pull requests

2 participants