{"id":21802076,"url":"https://github.com/php-translation/cli","last_synced_at":"2025-04-13T18:40:58.282Z","repository":{"id":57040039,"uuid":"96287195","full_name":"php-translation/cli","owner":"php-translation","description":"CLI support for translations","archived":false,"fork":false,"pushed_at":"2017-08-20T16:52:28.000Z","size":12998,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T09:22:05.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-translation.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-05T06:59:05.000Z","updated_at":"2024-05-15T11:32:05.000Z","dependencies_parsed_at":"2022-08-24T00:51:20.951Z","dependency_job_id":null,"html_url":"https://github.com/php-translation/cli","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-translation%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-translation%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-translation%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-translation%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-translation","download_url":"https://codeload.github.com/php-translation/cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248764370,"owners_count":21158073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T11:22:36.912Z","updated_at":"2025-04-13T18:40:58.261Z","avatar_url":"https://github.com/php-translation.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLI support for translation\n\n[![Latest Version](https://img.shields.io/github/tag/php-translation/cli.svg?style=flat-square)](https://github.com/php-translation/cli/releases)\n[![Build Status](https://img.shields.io/travis/php-translation/cli.svg?style=flat-square)](https://travis-ci.org/php-translation/cli)\n[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-translation/cli.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-translation/cli)\n[![Quality Score](https://img.shields.io/scrutinizer/g/php-translation/cli.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-translation/cli)\n\nCLI support for translation. It allows you use the TranslationBundle without installing it in your application. You can\nuse the WebUI and sync translations with remote storages.\n \n### Use\n\nTo use the CLI you need to fetch the binary and add your configuration file. \n\n```bash\nwget https://php-translation.github.io/cli/downloads/translation.phar\nchmod +x translation.phar\ntouch translation.yml\n```\n\nExample configuration is the same as for the TranslationBundle. \n\n```yaml\n# translation.yml\ntranslation:\n  locales: [\"en\", \"sv\"]\n  configs:\n    app:\n      project_root: \"%translation.project_root%\" # This line is important for the CLI config. \n      dirs: [\"%translation.project_root%/app/Resources/views\", \"%translation.project_root%/src\"]\n      output_dir: \"%translation.project_root%/app/Resources/translations\"\n      excluded_names: [\"*TestCase.php\", \"*Test.php\"]\n      excluded_dirs: [cache, data, logs]\n```\n\n\u003e **Note:** \"%translation.project_root%\" will be your `cwd()` from where you execute the command.\n\nYou may now run the same commands as you do with the TranslationBundle but without\nthe \"translation:\" prefix\n\n* download                                  \n* extract  \n* sync  \n* etc\n\n``` bash\nphp translation.phar download\n```\n\nYou may also run PHP's web server with the WebUI with: \n \n``` bash\nphp translation.phar webui\n```\n\n### Build\n\nTo build a phar make sure you have [Box project](https://box-project.github.io/box2/) installed and\n`phar.readonly = 0` in your php.ini. \n\nRead more at: https://moquet.net/blog/distributing-php-cli/\n\n```\nmake build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-translation%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-translation%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-translation%2Fcli/lists"}