You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
When you're a software developer and your native language is not English, chances are that you will be switching a lot between English and your native language. I would like to be able to choose the language from my available spell check dictionaries.
The current workaround is to change the system dictionary, but that is cumbersome and most of the time I only want to change the language for the application I am working in at that moment.
On GNU/Linux graphical desktop environments applications that work with text all provide a way to either set the language of the text (Libre/OpenOffice) or to select the current language (Gedit, web browsers, etc.).
Firefox does this very nicely for example:
Can we get this functionality in Atom? On GNU/Linux (I don't know about Windows, does it use Hunspell as well?) changing the user's locale is the only way to change the default dictionary language. This means that Atom's spell check is basically stuck in one language, even though multiple dictionaries are available.
It looks like https://github.com/atom/node-spellchecker provides an OS-agnostic interface for spell-checking (using either Hunspell or the system spell checker if you are using Mac OS X). Perhaps it is possible to add a call for a list of available languages as well?
Reacted by Tim, Rafael Jeffman, Eran Tiktin, Eike Lurz, Mac Ryan, Andreas Döbeling, Max Desiatov, Angel Curros, Gregory Bass, Evpok and 5 more
IMHO, language selection is bad. Many people write texts in their native language and document their programs in English. Thus one needs to switch the language regularly, which is tedious. For example as a German native speaker who also writes a lot of text in English (like this post) I have given up on reconfiguring the spell checking language In Chrome. I brought that up before in #25.
Reacted by Evpok, Daniel Thoren, Esteban Echeverry, KuroKensei, Patrick Lohmann, Timlukas Bloch, Alvaro Carril, Janos Tolgyesi and Agustín Valencia
@Bengt
Detecting languages automatically is quite error prone, especially in a programming context. The user is the only one who can reliably indicate which language should be the primary target of the spell-checker.
In multi-language documents, being able to use the spell-checker on all languages at once is certainly a nice-to-have feature, but not relevant to this issue, which is that there is currently no way to switch languages from within the editor.
Detecting languages automatically is quite error prone, especially in a programming context.
Do you have anything to support that? My impression is that it is quite feasible. Especially, LangID claims to be robust against text being mixed with programming language syntax.
The user is the only one who can reliably indicate which language should be the primary target of the spell-checker.
In my experience, users do not follow language guidelines strictly, even if they set them themselves. For example some people comment code in multiple languages in the same project. So users might select a language because they have a policy of writing in a that language but spellchecking might still fail on comments that violate that policy. I see two solutions to that: Either detect the different language and spell check it anyways or detect the violation of the policy. Such a policy could be formally defined and checked by a Linter, but talking Atom Spell Check, I think it should do it's best to spell check as much text as possible. Ignoring mixed languages seems like a one-size-fits-all approach to a problem where this really isn't true.
Personal experience with mixed Dutch-English documents, and Dutch documents containing a lot of technical jargon in English.
In any case, it is hard — and often impossible if there is not much text to work with — to automatically detect the desired dictionary when languages have multiple variants (as almost all do). When I edit a Dutch manual page, I want the spell-check to use Dutch as written in the Netherlands (and not as written in Belgium, or the Netherlands Antilles), and for the corresponding English page I prefer English, as written in the United Kingdom (explicitly en_GB, rather than en_US). LangID detects only language, not locale.
In my opinion software helpfully selecting not quite the right dictionary is anathema to a good user experience. This is also one of the reasons why web browsers offer the language selection menu, and word-processors such as LibreOffice Writer allow you to set the locale for a specific text-style.
Ignoring mixed languages seems like a one-size-fits-all approach
This issue suggests adding a language selection option, similar to that found in Firefox and Chrome. It fixes the problem of editing text in Atom in one language, whilst your system locale is set to another.
For your suggestion of automatic language detection, you should probably open a new issue or pull request.
Reacted by John Gardner, Angelo Villegas, Luis Hdez, Jose Bolos, Evpok, Danilo Freire, Marc Compte, Thomas Pietrzak, Esteban Echeverry and Landon Abney
In my opinion software helpfully selecting not quite the right dictionary is anathema to a good user experience.
I think it is far better to guess the right dictionary in most cases, than to force selecting it in every case. To stick with your example, language/locale detection might detect en_US while you misspell the british "meagre" as "meager". That should but only happen when there is no text with other words that are written differently among these locales and are correctly spelled in their en_GB variant.
So this should happen far more seldomly than switching back and forward between your native and your secondary language. I think we need to accept some glitches when working on natural language with computers. For example, my Chrome is currently spellchecking en_GB and marks "seldomly" as a misspelling in the sentence previous to the previous sentence.
Ignoring mixed languages seems like a one-size-fits-all approach
This issue [...] fixes the problem of editing text in Atom in one language, whilst your system locale is set to another.
I oppose building a language selection dialogue, now because it might prohibit implementing language detection, in the future. Language detection would also work with texts written in different languages than the system locale and avoid (IMHO at least) the usability fail of forcing the user to switch languages manually.
Perhaps this conflict isn't one though. With a language selection dialogue as suggested here, language detection could preselect a language in said dialogue and the user could override that preselection when language detection fails or just to be sure the right locale is enforced. That way, the language selection dialogue could be implemented now and augmented with a language-detection-based preselection in the future.
I use Atom to take notes in markdown format. I have to do so in different languages.
Changing the system language when switching between two files?? No way.
So currently I have to live with the curly lines and copy the "finished" document over to a different tool to do my checking. I think there are better ways.
Reacted by MAWSpitau, Luis Hdez, seeafish, Niklas Grönblom, lincolnfrias, Caesar Schinas, Théo Segonds, Chris Mathys, Horacio Chávez, François Téchené and 5 more
Some of my files in English and others in a different language (although I'm trying to keep all of them in English). It would be nice if I could select the language used for the spell check in individual files. Auto detecting them would be better, but I don't know if that solution would be problematic, as previously discussed.
Actually, I would like to see project files that I could store, where this settings were saved. But that would be a different discussion.
Unfortunately, an algorithm cannot reliably distinguish between language variants. In fact, cld makes no attempt to so from what I can tell. It only detects the language (e.g., 'English' or en), it does not distinguish between language variants (e.g., en_GB and en_US). This is not good enough for a spell-checker, because spelling dictionaries are language-variant-specific.
Also, such local lingual idiosyncrasies are precisely why we like having spell-checkers in the first place. It is not very helpful if your editor claims "Nice color!" is correct English when you are actually writing text meant for a British audience. 😃
I have Atom 1.23.0, and I still can't switch languages manually.
Automatic detection can be useful in some cases. But most of the time, I'm damn better than any algorithm at knowing what language I would like to spell check.
Reacted by Starbeamrainbowlabs, Harald, Martin Kausche, Jon Gibbins, Emerson Mello, Marco Brandizi, Rüdiger Busche, phlegx, Eduardo Aparicio Cardenes, donlencho and 7 more
Activity
jdhoek commentedon May 22, 2014
Related to #11.
Bengt commentedon Oct 30, 2014
IMHO, language selection is bad. Many people write texts in their native language and document their programs in English. Thus one needs to switch the language regularly, which is tedious. For example as a German native speaker who also writes a lot of text in English (like this post) I have given up on reconfiguring the spell checking language In Chrome. I brought that up before in #25.
jdhoek commentedon Oct 30, 2014
@Bengt
Detecting languages automatically is quite error prone, especially in a programming context. The user is the only one who can reliably indicate which language should be the primary target of the spell-checker.
In multi-language documents, being able to use the spell-checker on all languages at once is certainly a nice-to-have feature, but not relevant to this issue, which is that there is currently no way to switch languages from within the editor.
Bengt commentedon Oct 30, 2014
Do you have anything to support that? My impression is that it is quite feasible. Especially, LangID claims to be robust against text being mixed with programming language syntax.
In my experience, users do not follow language guidelines strictly, even if they set them themselves. For example some people comment code in multiple languages in the same project. So users might select a language because they have a policy of writing in a that language but spellchecking might still fail on comments that violate that policy. I see two solutions to that: Either detect the different language and spell check it anyways or detect the violation of the policy. Such a policy could be formally defined and checked by a Linter, but talking Atom Spell Check, I think it should do it's best to spell check as much text as possible. Ignoring mixed languages seems like a one-size-fits-all approach to a problem where this really isn't true.
jdhoek commentedon Oct 30, 2014
Personal experience with mixed Dutch-English documents, and Dutch documents containing a lot of technical jargon in English.
In any case, it is hard — and often impossible if there is not much text to work with — to automatically detect the desired dictionary when languages have multiple variants (as almost all do). When I edit a Dutch manual page, I want the spell-check to use Dutch as written in the Netherlands (and not as written in Belgium, or the Netherlands Antilles), and for the corresponding English page I prefer English, as written in the United Kingdom (explicitly
en_GB, rather thanen_US). LangID detects only language, not locale.In my opinion software helpfully selecting not quite the right dictionary is anathema to a good user experience. This is also one of the reasons why web browsers offer the language selection menu, and word-processors such as LibreOffice Writer allow you to set the locale for a specific text-style.
This issue suggests adding a language selection option, similar to that found in Firefox and Chrome. It fixes the problem of editing text in Atom in one language, whilst your system locale is set to another.
For your suggestion of automatic language detection, you should probably open a new issue or pull request.
Bengt commentedon Nov 14, 2014
I think it is far better to guess the right dictionary in most cases, than to force selecting it in every case. To stick with your example, language/locale detection might detect
en_USwhile you misspell the british "meagre" as "meager". That should but only happen when there is no text with other words that are written differently among these locales and are correctly spelled in theiren_GBvariant.So this should happen far more seldomly than switching back and forward between your native and your secondary language. I think we need to accept some glitches when working on natural language with computers. For example, my Chrome is currently spellchecking
en_GBand marks "seldomly" as a misspelling in the sentence previous to the previous sentence.I oppose building a language selection dialogue, now because it might prohibit implementing language detection, in the future. Language detection would also work with texts written in different languages than the system locale and avoid (IMHO at least) the usability fail of forcing the user to switch languages manually.
Perhaps this conflict isn't one though. With a language selection dialogue as suggested here, language detection could preselect a language in said dialogue and the user could override that preselection when language detection fails or just to be sure the right locale is enforced. That way, the language selection dialogue could be implemented now and augmented with a language-detection-based preselection in the future.
dpagano commentedon Jul 15, 2015
I use Atom to take notes in markdown format. I have to do so in different languages.
Changing the system language when switching between two files?? No way.
So currently I have to live with the curly lines and copy the "finished" document over to a different tool to do my checking. I think there are better ways.
BujiasBitwise commentedon Sep 12, 2015
Some of my files in English and others in a different language (although I'm trying to keep all of them in English). It would be nice if I could select the language used for the spell check in individual files. Auto detecting them would be better, but I don't know if that solution would be problematic, as previously discussed.
Actually, I would like to see project files that I could store, where this settings were saved. But that would be a different discussion.
danielschmitz commentedon Oct 5, 2015
hellboy81 commentedon Oct 6, 2015
louis-etne commentedon Oct 24, 2015
anaisbetts commentedon Oct 24, 2015
This isn't true, node-cld2 will very very accurately detect text as long as it is more than a sentence.
jdhoek commentedon Oct 24, 2015
@paulcbetts
Unfortunately, an algorithm cannot reliably distinguish between language variants. In fact,
cldmakes no attempt to so from what I can tell. It only detects the language (e.g., 'English' oren), it does not distinguish between language variants (e.g.,en_GBanden_US). This is not good enough for a spell-checker, because spelling dictionaries are language-variant-specific.Also, such local lingual idiosyncrasies are precisely why we like having spell-checkers in the first place. It is not very helpful if your editor claims "Nice color!" is correct English when you are actually writing text meant for a British audience. 😃
anaisbetts commentedon Oct 24, 2015
lol, let's run before we can walk, right now Atom doesn't even do anything other than English
12 remaining items
OJFord commentedon Feb 19, 2016
This is now merged and released in v0.67.0 - @sbrl
sbrl commentedon Feb 20, 2016
@OJFord Awesome, thanks!
Changed spell-checking to be plugin-based.
Changed spell-checking to be plugin-based.
Changed spell-checking to be plugin-based.
Changed spell-checking to be plugin-based.
Changed spell-checking to be plugin-based.
Changed spell-checking to be plugin-based.
OJFord commentedon Mar 20, 2016
FYI @sbrl @darobin this is in Atom 1.7.x, so you can use it now in the beta releases, or hopefully not wait too much longer before stable reaches 1.7.
sbrl commentedon Mar 20, 2016
@OJFord Thanks! I'm using stable. Not too long now!
Changed spell-checking to be plugin-based.
MAWSpitau commentedon May 12, 2016
I installed the current beta right now, but I am not able to find any language suggestions...
ThomasPietrzak commentedon Dec 15, 2017
I have Atom 1.23.0, and I still can't switch languages manually.
Automatic detection can be useful in some cases. But most of the time, I'm damn better than any algorithm at knowing what language I would like to spell check.
x0s commentedon Jan 23, 2019
Here is how I manually switch between system default language (English for me) and others (French for example) on Ubuntu/Atom
apt://hunspell-fr