{"id":14983781,"url":"https://github.com/symfony/phrase-translation-provider","last_synced_at":"2026-02-26T11:12:23.899Z","repository":{"id":187867459,"uuid":"677727936","full_name":"symfony/phrase-translation-provider","owner":"symfony","description":"Symfony Phrase Translation Provider Bridge","archived":false,"fork":false,"pushed_at":"2024-11-29T09:09:36.000Z","size":47,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"7.2","last_synced_at":"2025-01-29T14:23:24.165Z","etag":null,"topics":["component","php","phrase","provider","symfony","symfony-component","translation"],"latest_commit_sha":null,"homepage":"https://symfony.com/translation","language":"PHP","has_issues":false,"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/symfony.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"fabpot","tidelift":"packagist/symfony/symfony","custom":"https://symfony.com/sponsor"}},"created_at":"2023-08-12T12:43:50.000Z","updated_at":"2024-09-25T14:30:48.000Z","dependencies_parsed_at":"2023-08-12T13:43:16.097Z","dependency_job_id":"d81479f8-52c9-4acc-b99c-62612dda64d3","html_url":"https://github.com/symfony/phrase-translation-provider","commit_stats":{"total_commits":13,"total_committers":6,"mean_commits":"2.1666666666666665","dds":0.6923076923076923,"last_synced_commit":"88fb59a9d28e43d3bc52eb341b5f3f1ce37113db"},"previous_names":["symfony/phrase-translation-provider"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fphrase-translation-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fphrase-translation-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fphrase-translation-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fphrase-translation-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/symfony","download_url":"https://codeload.github.com/symfony/phrase-translation-provider/tar.gz/refs/heads/7.2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237117027,"owners_count":19258344,"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":["component","php","phrase","provider","symfony","symfony-component","translation"],"created_at":"2024-09-24T14:07:54.786Z","updated_at":"2025-10-19T11:31:30.048Z","avatar_url":"https://github.com/symfony.png","language":"PHP","funding_links":["https://github.com/sponsors/fabpot","https://tidelift.com/funding/github/packagist/symfony/symfony","https://symfony.com/sponsor"],"categories":[],"sub_categories":[],"readme":"Phrase Translation Provider\n============================\n\nProvides Phrase integration for Symfony Translation.\n\nDSN example\n-----------\n\n```\n// .env file\nPHRASE_DSN=phrase://PROJECT_ID:API_TOKEN@default?userAgent=myProject\n```\n\n**DSN elements**\n\n - `PROJECT_ID`: can be retrieved in Phrase from `project settings \u003e API \u003e Project ID`\n - `API_TOKEN`: can be created in your [Phrase profile settings](https://app.phrase.com/settings/oauth_access_tokens)\n - `default`: endpoint, defaults to `api.phrase.com`\n\n**Required DSN query parameters**\n\n - `userAgent`: please read [this](https://developers.phrase.com/api/#overview--identification-via-user-agent) for some examples.\n\nSee [fine tuning your Phrase api calls](#fine-tuning-your-phrase-api-calls) for additional DSN options.\n\nPhrase locale names\n-------------------\n\nTranslations being imported using the Symfony XLIFF format in Phrase, locales are matched on locale name in Phrase.\nTherefor it's necessary the locale names should be as defined in [RFC4646](https://www.ietf.org/rfc/rfc4646.txt) (e.g. pt-BR rather than pt_BR).\nNot doing so will result in Phrase creating a new locale for the imported keys.\n\nLocale creation\n---------------\n\nIf you define a locale in your `translation.yaml` which is not configured in your Phrase project, it will be automatically created. Deletion of locales however, is (currently) not managed by this provider.\n\nDomains as tags\n---------------\n\nTranslations will be tagged in Phrase with the Symfony translation domain they belong to.\nCheck the [wickedone/phrase-translation-bundle](https://github.com/wickedOne/phrase-translation-bundle) if you need help managing your tags in Phrase.\n\nCache\n-----\n\nThe read responses from Phrase are cached to speed up the read and delete methods of this provider and also to contribute to the rate limit as little as possible.\nTherefor the factory should be initialised with a PSR-6 compatible cache adapter.\n\nFine tuning your Phrase api calls\n---------------------------------\n\nYou can fine tune the read and write methods of this provider by adding query parameters to your dsn configuration.\nGeneral usage is `read|write[option_name]=value`\n\n**example:\n** `phrase://PROJECT_ID:API_TOKEN@default?read[encoding]=UTF-8\u0026write[update_descriptions]=0`\n\n**Read**\n\nIn order to read translations from Phrase the [download locale](https://developers.phrase.com/api/#get-/projects/-project_id-/locales/-id-/download) call is made to the Phrase API, supported parameters can be found in their documentation.\n\nOne additional read parameter is `fallback_locale_enabled` (defaults to `0`). When set to `1`, this provider will use the fallback locales as they are configured in Phrase.\n\n\u003e ❗enabling the fallback locale will disable the caching of the conditional get requests\n\n**Write**\n\nIn order to write translations to Phrase the [upload](https://developers.phrase.com/api/#post-/projects/-project_id-/uploads) call is made to the Phrase API, supported parameters can be found in their documentation.\n\n**Default values**\nThis provider uses the following default values for read and write requests. All but `file_format` and `tags` can be overridden by configuring your DSN query parameters.\n\n| method(s)    | name                         |  type  | default value                                 |\n|--------------|------------------------------|:------:|-----------------------------------------------|\n| read \u0026 write | `file_format`                | string | symfony_xliff                                 |\n| read \u0026 write | `tags`                       | string | dynamically set to symfony translation domain |\n| read         | `include_empty_translations` |  bool  | 1                                             |\n| read         | `format_options`             | array  | enclose_in_cdata                              |\n| read         | `fallback_locale_enabled`    |  bool  | 0                                             |\n| write        | `update_translations`        |  bool  | 1                                             |\n\nResources\n---------\n\n * [Phrase strings API documentation](https://developers.phrase.com/api/#overview)\n * [Contributing](https://symfony.com/doc/current/contributing/index.html)\n * [Report issues](https://github.com/symfony/symfony/issues) and\n   [send Pull Requests](https://github.com/symfony/symfony/pulls)\n   in the [main Symfony repository](https://github.com/symfony/symfony)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymfony%2Fphrase-translation-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsymfony%2Fphrase-translation-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymfony%2Fphrase-translation-provider/lists"}