Bug 81754

Summary: Automatic detection or selection of language when replying
Product: [Applications] kmail2 Reporter: Kjetil Kjernsmo <kjetil>
Component: composerAssignee: kdepim bugs <kdepim-bugs>
Status: CONFIRMED ---    
Severity: wishlist CC: annma, arvidjaar, bjoern, kde.bugzilla.2012, olekgutjwr, olivier.fisette, paul-a-bauer, sanette-linux
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kjetil Kjernsmo 2004-05-17 19:40:53 UTC
Version:            (using KDE KDE 3.2.2)
Installed from:    Debian testing/unstable Packages

I'd like KMail to detect automagically the language of the e-mail I'm responding to, and set the dictionary and phrases accordingly.

Well, it has been discussed before, e.g. in Bug #43349, where Daniel was encouraged to file a separate bug. I couldn't find that bug so I'm just karmawhoring or something... :-) 

For the implementation of it, I guess it could be worth looking at the Perl module Lingua::Ident
http://search.cpan.org/dist/Lingua-Ident/
which does something like that.
Comment 1 S. Yenot 2004-09-25 05:48:05 UTC
I don't think your request goes far enough.  Ideally, we could mix languages or reply in a different language and still have our spelling checked painlessly. We'd want it to work not just in kmail, but in all applications that provide spell checking.

See: http://bugs.kde.org/show_bug.cgi?id=66516
Comment 2 Bram Schoenmakers 2007-01-21 19:39:10 UTC
*** Bug 140404 has been marked as a duplicate of this bug. ***
Comment 3 Björn Ruberg 2009-12-19 21:49:46 UTC
*** Bug 80587 has been marked as a duplicate of this bug. ***
Comment 4 Björn Ruberg 2009-12-21 20:17:15 UTC
This is exspecially true for the automatic macros in templates. They should be set according to the language detected - or selected. 
The language selection must be configureable from the UI.

See related bug #141200
Comment 5 Olek Gut 2011-11-23 06:23:49 UTC
This feature request is still valid for KMail 2
Comment 6 Anne-Marie Mahfouf 2011-11-23 08:30:33 UTC
Reassigning to kmail2
Comment 7 San 2011-11-29 10:55:02 UTC
(In reply to comment #6)
> Reassigning to kmail2

I was able to achieve this using emacs as an external editor (and with emacs spell-checker, of course).

The magic was done by libtextcat. This can be done either on the whole text, or paragraph by paragraph.

For the code, see
http://os.inf.tu-dresden.de/~mp26/download/flyspell-textcat.el
(I had to adapt it)

So I guess it should not be difficult to implement directly into the kmail editor (?)