sponsor Vim development Vim logo Vim Book Ad

PA_translator : Plugin for easily translating single word or sentences without leaving your Vim

 script karma  Rating 49/13, Downloaded by 1056  Comments, bugs, improvements  Vim wiki

created by
Andrij Pukalskyy
 
script type
utility
 
description
   So, you are working with any document in foreign language and some word is unknown to you. In normal mode, put cursor on this word and press ,tr (in previous versions: <A-Space>) buttons. The translation of the word will appear in command screan. If word can not be translated you will receive message: 'The `your_word` can not be translated'.
   To translate range of the words (sentences), go to visual mode by pressing <Esc>,<v> buttons. Select desired text, for instance, by <Shift-V>, and after that press ,tr (in previous versions: <A-Space>).
 
install details
To install:
  - Download the PA_translator.zip.
  - Extract the zip archive into your runtime directory. The archive contains plugin/PA_translator.vim, and doc/PA_translator.txt.
  - Start Vim or go to an existing instance of Vim.
  - Execute the following command:

      :helptag <your runtime directory/doc

    This will generate all the help tags for any file located in the doc directory.
  - By default plugin translate from English into Ukrainian (it is my native language). You can change them by adding to your .vimrc:

       let g:PA_translator_from_lang = 'your_from_language_code'
       let g:PA_translator_to_lang = 'your_to_language_code'

    Language codes are google translator API language codes.

   This plugin is only available if 'compatible' is not set and vim has been compiled with RUBY language support.
    It also requires access to network.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
PA_translator.zip 0.0.4 2010-03-23 7.0 Andrij Pukalskyy Fixing according to updated translate.google
PA_translator.zip 0.0.3 2009-07-04 7.0 Andrij Pukalskyy Bug fixing:
1. IP host resolving fixed for linux/freebsd OS;
2. `^M` unix/windows bug fixed;
3. Default maps changed from <A-Space> to ,tr because many OS reserve such shortcuts;
PA_translator.zip 0.0.2 2009-06-24 7.0 Andrij Pukalskyy Bug fixing
PA_translator.zip 0.0.1 2009-04-16 7.0 Andrij Pukalskyy Initial upload
ip used for rating: 18.116.90.141

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github