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

google-auto-translate

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-auto-translate

Translate language files using google translate service and diff tools.

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

google-auto-translate

Translate language files using google translate service. This module improves performance and decrases rate limit usage by working with file diffs only.

Note: This module is not stable yet, use with caution.

Install

npm install google-auto-translate

Usage

CLI

.\node_modules\.bin\google-auto-translate [apiKey] [inputFile] [inputLanguageIsoKey] [generatedFilesDir] [targetLanguage1,targetLanguage2,...]
.\node_modules\.bin\google-auto-translate [apiKey] ./en.json en ./ de,fr,it
  • apiKey: Your google translate api key
  • inputFile: Source language json file from which the target languages will be generated from. Must be an object like the following:
{
  "USER_HEADER": "English Header Value",
  "ADMIN_AREA": {
    "SECTION_1": {
      "USER_GREETING": "Hello user",
      "USER_DELETE_CONFIRM_TEXT": "Are you sure to delete the user?"
    }
  }
}
  • inputLanguageIsoKey: Input file language key, example: en
  • generatedFilesDir: Location of the generated files.
  • targetLanguage1,targetLanguage2,...: ISO language keys of the generated languages, examples:
    • en
    • de
    • tr
    • it
    • fr
    • Full list: https://cloud.google.com/translate/docs/languages

Todos

  • Rate Limiting (Currently google quota has 100.000 characters every 100 seconds)
  • Unit Tests
  • Better/More unit testable code structure

Keywords

FAQs

Package last updated on 08 May 2018

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