antongorodezkiy / po-translation
CLI client to translate .po files
dev-master
2016-05-27 16:11 UTC
Requires
- gettext/gettext: ^3.6
- wp-cli/php-cli-tools: ^0.11.1
- yandex/translate-api: ^1.5
This package is not auto-updated.
Last update: 2025-02-01 21:08:59 UTC
README
Translation .po (gettext) files via Command Line Interface (CLI) with Yandex Translator API
Requirements
- PHP 5.4+
Yandex Translator
This package is using Yandex Translator API https://translate.yandex.com and you'll need to obtain Yandex Translator API key (free on a moment of develop this package) - Get API Key
Dependencies
- gettext/gettext - PHP library to collect and manipulate gettext (.po, .mo, .php, .json, etc)
- yandex/translate-api - Client for Yandex.Translate API
- wp-cli/php-cli-tools - A collection of tools to help with PHP command line utilities
Usage
Run php trans
via CLI interface from the package dir.
Help
php trans -h
Options
$ 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]
Example
php trans --api-key trnsl.1.1.20162d0a.34add747dc2e2e2f --src-po /home/user/public_html/wp-content/themes/some-theme/languages/uk_UA.po
Copyright
antongorodezkiy, 2016
License
MIT