This package allows you to translate from the terminal.
composer global require ahmetbarut/php-translate-api
~/.composer/vendor/bin/translate tr "Hello"
# Merhaba
tr
: The language code.text
: The text to translate.en
: Source language code.