antongorodezkiy/po-translation

CLI 客户端用于翻译 .po 文件

dev-master 2016-05-27 16:11 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:58:44 UTC


README

通过命令行界面(CLI)使用 Yandex 翻译 API 翻译 .po(gettext)文件

要求

  • PHP 5.4+

Yandex 翻译器

此包使用 Yandex 翻译 API https://translate.yandex.com,您需要获取 Yandex 翻译 API 密钥(在开发此包时是免费的) - 获取 API 密钥

依赖关系

使用方法

在包目录下通过 CLI 界面运行 php trans

帮助

php trans -h

选项

$ php trans -h

PO Translator (using Yandex Translator https://translate.yandex.com )
Flags
  --help, -h  Show this help screen

Options
  --api-key   Yandex API key
  --src-po    source .po-file path
  --src-lang  source language [default: en]

示例

php trans --api-key trnsl.1.1.20162d0a.34add747dc2e2e2f --src-po /home/user/public_html/wp-content/themes/some-theme/languages/uk_UA.po

版权

antongorodezkiy,2016

许可

MIT