Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 4
Forks: 2
Open Issues: 0
Type:project
Requires
- php: ^7.0
- doctrine/collections: dev-psr4 as v1.99.0
- doctrine/lexer: dev-psr4 as v1.0.2
- guzzlehttp/psr7: ^1.4
- padraic/phar-updater: ^1.0
- php-http/curl-client: ^1.7
- php-http/discovery: dev-all-psr4 as 1.7
- php-http/httplug-bundle: ^1.7
- php-http/message: ^1.6
- php-translation/flysystem-adapter: ^0.2.0
- php-translation/loco-adapter: ^0.4
- php-translation/phraseapp-adapter: ^0.2
- php-translation/symfony-bundle: ^0.4
- sensio/framework-extra-bundle: ^3.0
- symfony/asset: ^3.3
- symfony/console: 3.3.*
- symfony/form: ^3.3
- symfony/framework-bundle: 3.3.*
- symfony/polyfill-apcu: ^1.0
- symfony/templating: ^3.3
- symfony/twig-bundle: 3.3.*
- symfony/web-server-bundle: 3.3.*
- twig/twig: 2.3.*
This package is auto-updated.
Last update: 2024-10-25 07:57:41 UTC
README
CLI support for translation. It allows you use the TranslationBundle without installing it in your application. You can use the WebUI and sync translations with remote storages.
Use
To use the CLI you need to fetch the binary and add your configuration file.
wget https://php-translation.github.io/cli/downloads/translation.phar chmod +x translation.phar touch translation.yml
Example configuration is the same as for the TranslationBundle.
# translation.yml translation: locales: ["en", "sv"] configs: app: project_root: "%translation.project_root%" # This line is important for the CLI config. dirs: ["%translation.project_root%/app/Resources/views", "%translation.project_root%/src"] output_dir: "%translation.project_root%/app/Resources/translations" excluded_names: ["*TestCase.php", "*Test.php"] excluded_dirs: [cache, data, logs]
Note: "%translation.project_root%" will be your
cwd()
from where you execute the command.
You may now run the same commands as you do with the TranslationBundle but without the "translation:" prefix
- download
- extract
- sync
- etc
php translation.phar download
You may also run PHP's web server with the WebUI with:
php translation.phar webui
Build
To build a phar make sure you have Box project installed and
phar.readonly = 0
in your php.ini.
Read more at: https://moquet.net/blog/distributing-php-cli/
make build