page-translator
A Vue component that was created to replace a broken Google page translation service.
This component uses the Google Cloud Translation API
and requires your API KEY
.
Usage
Get Google Cloud Translation API KEY
Install
-
npm install @nnm/page-translator
Use
-
import 'page-translator' from '@nnm/page-translator' import '@nnm/page-translator/dist/page-translator.css
-
... Vue.use(page-translator); ...
-
<page-translator target="laungage code ex) en, ko ..." position="left or right" apikey="Input your API KEY" />
Bug
-
The function does not work if you press the button several times quickly.I think it's a function synchronization problem or DOM tree's rendering problem. I would appreciate it if you gave me a hint.- This problem was solved by adding a spinner to setTimeout.
License
This is released under the MIT license. See LICENSE for details.