{"id":28763462,"url":"https://github.com/verbb/plugin-translator","last_synced_at":"2025-06-17T09:09:23.789Z","repository":{"id":234332372,"uuid":"788678699","full_name":"verbb/plugin-translator","owner":"verbb","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-23T02:22:32.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-23T03:29:01.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/verbb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-18T21:55:27.000Z","updated_at":"2024-05-23T03:29:04.690Z","dependencies_parsed_at":"2024-04-18T22:45:54.224Z","dependency_job_id":"71e7c1c6-fc81-440d-a4ba-00e0377eabaa","html_url":"https://github.com/verbb/plugin-translator","commit_stats":null,"previous_names":["verbb/plugin-translator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/verbb/plugin-translator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verbb%2Fplugin-translator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verbb%2Fplugin-translator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verbb%2Fplugin-translator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verbb%2Fplugin-translator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/verbb","download_url":"https://codeload.github.com/verbb/plugin-translator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verbb%2Fplugin-translator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260326769,"owners_count":22992386,"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":"2025-06-17T09:09:22.802Z","updated_at":"2025-06-17T09:09:23.777Z","avatar_url":"https://github.com/verbb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plugin Translator Module for Craft CMS\nA console command for Craft CMS to generate translations for plugins using Deepl.\n\nRun via `./craft plugin-translator/translate plugin-handle`\n\n- It will extract translation strings from PHP, HTML, Twig, JS and Vue files\n- Create a `translations/en/plugin-handle.php` file (assumes written language is in English)\n- Create language translations (default 20) using Deepl. Add a `DEEPL_API_KEY` .env variable\n\nExtraction will match the following (single or double quotes is fine for everything):\n\n#### PHP\n```php\nCraft::t('plugin-handle', 'Some String');\nCraft::t('plugin-handle', 'Some String that\\'s escaped');\nCraft::t('plugin-handle', 'Some String', ['params' =\u003e 'value']);\n```\n\n#### HTML/Twig\n```twig\n'Some String' | t('plugin-handle')\n'Some String' | t('plugin-handle', { params: 'value' })\n'Some String' | translate('plugin-handle')\n'Some String' | translate('plugin-handle', { params: 'value' })\n'Some String'|t('plugin-handle')\n'Some String'|t('plugin-handle', { params: 'value' })\n'Some String'|translate('plugin-handle')\n'Some String'|translate('plugin-handle', { params: 'value' })\n'Some String that\\'s escaped' | t('plugin-handle')\n\n{{ someFunction({\n    label: 'Some String' | t('plugin-handle'),\n}) }}\n```\n\n#### JS/Vue\n```js\nCraft.t('plugin-handle', 'Some String')\nCraft.t('plugin-handle', 'Some String', { params: 'value' })\nt('Some String')\nt('Some String', { params: 'value' })\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverbb%2Fplugin-translator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverbb%2Fplugin-translator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverbb%2Fplugin-translator/lists"}