ntzrbtr / deepl-translator
Command-line tool to translate language files using DeepL
Installs: 28
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ntzrbtr/deepl-translator
Requires
- php: >=8.0.0
- deeplcom/deepl-php: ^1.2
- riimu/kit-phpencoder: ^2.4
- symfony/console: ^6.2
- symfony/dotenv: ^6.2
README
This is a simple command-line tool to translate files containing locale strings in the form of PHP array (as e.g. used by Laravel) using the DeepL API.
Installation
Install the package using composer: composer require --dev ntzrbtr/deepl-translate.
Setup
- Create a DeepL API key at https://www.deepl.com/pro#developer
- Create a
.envfile in the root of your project and add the following line:DEEPL_API_KEY=your-api-key
Usage
- Run
vendor/bin/deepl-translate [options] <source> <target>to translate your file<source>is the source file<target>is the target file- Within
[options]you can set the source and target language:--source-language(default:en)--target-language(default:de)