定制 levmyshkin/google-translate 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

levmyshkin/google-translate

最新稳定版本:1.0.2

Composer 安装命令:

composer require levmyshkin/google-translate

包简介

Node.js service for Google Translate

README 文档

README

It's a Drupal library for getting translation from Node.js service. It depends on iamtraction/google-translate npm package: https://www.npmjs.com/package/@iamtraction/google-translate https://github.com/iamtraction/google-translate

Installation and run Node.js service

Run these commands:

npm install
npm start

Usage

See Translator.postman_collection.json with POST request: http://localhost:8000

Langcodes must be ISO-639 codes: https://cloud.google.com/translate/docs/languages

with x-www-form-urlencoded data: translateText: Hello translateFrom: en translateTo: ru

Run node.js service in background

You can run translation node.js service in background or even on system start up:

npm install pm2@latest -g
yarn global add pm2
pm2 start index.js

More info about PM2: https://pm2.keymetrics.io/

Saving the app list to be restored at reboot.

Once you have started all desired apps, save the app list, so it will respawn after reboot:

pm2 save

统计信息

  • 总下载量: 227
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-05