1

If I name a variable groesste_zahl (biggest_number) PyCharm tells me I have a typo - but I don't want to use Umlauts (ä, ö, ü) or ß in variable names.

Disabling spell checking completely is not a possibility for me.

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
sneeed
  • 45
  • 6
  • Have you looked at this: https://stackoverflow.com/questions/1949976/where-to-find-dictionaries-for-other-languages-for-intellij/16278834#16278834? If you find one, you can import a German dictionary that contains both ways of spelling the word. – David Buck Aug 20 '21 at 13:19
  • Installl one of the default language specific dictionaries. The aspell hunspell variants should include spellings with and without umlauts. In case they don't just choose to add the specific word to the project specific dictionary. – bad_coder Aug 20 '21 at 14:35
  • It’s customary to program in American English — case in point, I’m German and currently living in the UK. But as l long as I can remember, regardless of (personal or company) project language, the *language in the code* I’ve used was US English. — Conversely, if you really need to program in German, well, just *use proper German spelling!* There isn’t really a valid reason to want to avoid umlauts if you want to use German variable names; the poor spell checker is just trying to do its job. – Konrad Rudolph Aug 20 '21 at 14:44
  • @KonradRudolph I've given this a lot of thought, sometimes you'll write in English but it doesn't make sense to translate business process variables into English - if you're working on a domain made of foreign language named entities. (The client may also specify whatever language they want, including bilingual documentation that will also be edited inside the IDE.) So the *"English only"* doesn't hold, especially since Python modules have defaulted to UTF-8. – bad_coder Aug 20 '21 at 14:50
  • @bad_coder Fair enough (and yes, I agree). But then why not use correct spelling? – Konrad Rudolph Aug 20 '21 at 14:51
  • @KonradRudolph good question. But changing an `ß` to `ss` seems acceptable. The same for changing `ø` to `oe` for example. Why? Because not all keyboards will have those special characters (this will force you to copy-paste them, or use unicode literals in the code, which looses redability). Hence the compromise solution of using accepted orthography rules that work for all keyboards, avoid translating words, and avoid unicode literals in code. – bad_coder Aug 20 '21 at 14:55

0 Answers0