Skip to content
Google translate plugin for Vim8/Neovim
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
plugin
pythonx
rplugin/python3/trans
.gitignore
LICENSE
README.md

README.md

trans.nvim

Google Translate plugin for Vim8/Neovim.

message

trans_nvim_normal_low

preview

trans_nvim_previe_log

Required

You must first set up authentication by creating a API Key or service account of GCP.

Then you need to install the trans command as follows.

$ go get github.com/utahta/trans/cmd/trans

API Key

The API Key documentation can be found here.

Set the environment variable TRANS_API_KEY to the API Key.

Service Account

The service account documentation can be found here.

Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the file path of the JSON file that contains your service account key.

Note

You need a little bit of money to use google translate API.
e.g. it costs $0.06 for 2889 characters.

Installation

" dein.vim
call dein#add('utahta/trans.nvim')
call dein#add('roxma/nvim-yarp')

" NeoBundle
NeoBundle 'utahta/trans.nvim'
NeoBundle 'roxma/nvim-yarp'

" vim-plug
Plug 'utahta/trans.nvim'
Plug 'roxma/nvim-yarp'

Settings

let g:trans_lang_locale = 'ja'
let g:trans_lang_output = 'preview'
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.