Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-gtranslate

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-gtranslate

gtranslate plugin for vue js

  • 2.0.20
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
177
increased by58.04%
Maintainers
1
Weekly downloads
 
Created
Source

vue-gtranslate

Install
yarn add vue-gtranslate
npm i vue-gtranslate

Caution

  • Add Translate.css to hide Google Translate pop up
  • Plugin may be unstable sometimes, expect bugs

Features

  • On the Fly page translation
  • Supports 40 languages
  • Easy to customize
Usage
  • Customize using css classes provided.
//index.html

<head>
    <script type="text/javascript">
        function googleTranslateElementInit() {
            new google.translate.TranslateElement(
                    { pageLanguage: "en" },
                    "google_translate_element"
            );
        }
    </script>
    <script
            type="text/javascript"
            src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"
    ></script>
</head>

//app.vue
<template>
  <div id="app">
    <Translator/>
  </div>
</template>

<script>

import Translator from "vue-gtranslate";
import "vue-gtranslate/translator.css"

export default {
  name: 'App',
  components: {
    Translator
  }
}
</script>

<style>

    .vg-body{
        display: grid;
        grid-template-columns: auto auto auto;
        padding: 10px;
        background: lightgrey;
    }

    .vg-container{
        padding: 20px;
        font-size: 30px;
        text-align: center;


    }
    .vg-text{
        color: black;
        padding-left:10px
    }

    .vg-items{
        display:flex;
        align-items:center;

    }

    .vg-flag{
        height:40px;
    }


</style>

Keywords

FAQs

Package last updated on 26 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc