{"id":36989037,"url":"https://github.com/g4code/translate","last_synced_at":"2026-01-13T23:28:16.583Z","repository":{"id":36831712,"uuid":"41138612","full_name":"g4code/translate","owner":"g4code","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-01T09:16:34.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-10-02T05:48:27.696Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/g4code.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2015-08-21T06:13:59.000Z","updated_at":"2024-03-01T09:16:18.000Z","dependencies_parsed_at":"2022-08-29T06:11:09.667Z","dependency_job_id":null,"html_url":"https://github.com/g4code/translate","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/g4code/translate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4code%2Ftranslate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4code%2Ftranslate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4code%2Ftranslate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4code%2Ftranslate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g4code","download_url":"https://codeload.github.com/g4code/translate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4code%2Ftranslate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-13T23:28:15.864Z","updated_at":"2026-01-13T23:28:16.577Z","avatar_url":"https://github.com/g4code.png","language":"PHP","readme":"Translate\n==========\n\n* Configuration of the gettext extension\n* Utlity tool to generate .mo files\n* Utility tool for extracting template strings\n\n## Install\n\n\u003e Using Composer and Packagist\n\n```sh\ncomposer require g4/translate\n```\n## Resources\n* Twig The i18n Extension http://twig.sensiolabs.org/doc/extensions/i18n.html\n* PHP gettext extension http://fr.php.net/manual/en/function.gettext.php\n\n## Requirements\n* \"twig/twig\" https://packagist.org/packages/twig/twig\n* \"twig/extensions\" https://packagist.org/packages/twig/extensions\n\n## Usage\nSet locale early in the program before rendering any internationalized template.\n\n```php\nuse G4\\Translate\\Locale\\Locale;\nuse G4\\Translate\\Locale\\Options;\n\n$options = new Options();\n$options\n    -\u003esetDomain('myDomain')\n    -\u003esetLocale('en_US')\n    -\u003esetPath('/path/to/locale/files');\n(new Locale($options))-\u003eset();\n```\n\n### Command line interface\nConvert .po files to .mo\n```sh\n./vendor/bin/translate --path /path/to/locale/files\n```\nwhere --path is path to your locale folder\n\nExtract template strings\n```sh\n./vendor/bin/translate-extract -t /path/to/templates -w /path/to/tmp -g /path/to/locale/files -d myDomain\n```\nwhere:\n* -t is path to folder that contains templates\n* -w is path to temp folder\n* -g is path to folder where myDomain.po file with strings will be generated\n* -d domain name\n\n\n## Development\n\n### Install dependencies\n\n    $ make install\n\n### Run tests\n\n    $ make test\n\n## License\n\n(The MIT License)\nsee LICENSE file for details...\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4code%2Ftranslate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg4code%2Ftranslate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4code%2Ftranslate/lists"}