Re: multilanguage e-mails, something I would like to share

Anne Wilson <[email protected]>
Newsgroups gmane.comp.kde.users.pim
Message-ID <[email protected]>
On Thursday 26 Aug 2010 21:25:40 Dj YB wrote:
> Hello,
> 
> some time ago I have been looking for a way to translate messages inside
> kmail as I am not native english speaker and most of the mails I get are
> in english.
> 
> So, using google translate, tw, perl, and kmail filters, here is a
> solution:
> 
> [note]
> if you have no need for messages translation you can stop here
> [/note]
> 
> create a new filter (lets call it "Translate"), set the filter criteria to
> something that will be always true like "subject" not equal "123123123999".
> 
> add an action: "Pipe Through" "~/bin/mail_translate.pl"
> in the advanced tab un-check all but "Add this filter to the Apply filter
> menu"
> 
> save the attached file in your ~/bin
> edit the script and look for "translate.google.com.en-he", change "en-he"
> to translate from whatever language you want to whatever language you
> want.
> 
> chmod a+x mail_translate.pl
> 
> to translate a message:
> right click on it and select "Apply Filter"->"Filter Translate"
> 
> the script will do one of two things (as far as I planned and tested):
> if the message is multipart with a text/plain part, a new text/plain part
> will be added containing the translation of the original text/plain part.
> 
> if the message is single part then a "--TRANSLATION--" (in the translated
> language) separator  and the translation of the original message body will
> be added to the end of the original message body.
> 
> as always you should not trust strangers offering you scripts, and now is
> no different.
> check the code and if you can\want please improve it.
> 
> Hope someone finds that useful (except for me),
> YB.

That sounds to me as though it would be really useful for many people.  How 
about adding it to http://userbase.kde.org/KMail/FAQs_Hints_and_Tips ?  Don't 
worry too much about syntax if you're not used to mediawiki - I'll help.

Anne
-- 
KDE Community Working Group
New to KDE Software? - get help from http://userbase.kde.org

_______________________________________________
KDE PIM users mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kdepim-users
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)

iEYEABECAAYFAkx3adsACgkQj93fyh4cnBcYtwCePQ0F0TiXsSPKxXTsLiW2ZOdV
ya4AnjitgB8hW0XcFGTsoAD3ELv8TQYO
=dSdx
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.