@nnm/page-translator

1.1.1 • Public • Published

page-translator

NPM GitHub stars

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"
    />

  • Translator gif

    usage gif
  • Translator OFF

    usage image disable
  • Translator ON

    usage image enable

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.

Dependencies (3)

Dev Dependencies (7)

Package Sidebar

Install

npm i @nnm/page-translator

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

1.52 MB

Total Files

24

Last publish

Collaborators

  • nnm