[kdepim-users] multilanguage e-mails, something I would like to share
Anne Wilson
cannewilson at googlemail.com
Fri Aug 27 08:31:39 BST 2010
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20100827/ce5d19f3/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM users mailing list
kdepim-users at kde.org
https://mail.kde.org/mailman/listinfo/kdepim-users
More information about the kdepim-users
mailing list