{"id":18781561,"url":"https://github.com/devture/silex-translation-bundle","last_synced_at":"2025-12-19T10:30:14.695Z","repository":{"id":56967209,"uuid":"82549855","full_name":"devture/silex-translation-bundle","owner":"devture","description":"Silex bundle that allows .json files to be translated between multiple languages.","archived":false,"fork":false,"pushed_at":"2017-03-17T18:15:42.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T11:16:18.306Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devture.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-20T11:18:46.000Z","updated_at":"2017-02-20T11:19:05.000Z","dependencies_parsed_at":"2022-08-21T09:50:35.703Z","dependency_job_id":null,"html_url":"https://github.com/devture/silex-translation-bundle","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fsilex-translation-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fsilex-translation-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fsilex-translation-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fsilex-translation-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devture","download_url":"https://codeload.github.com/devture/silex-translation-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699212,"owners_count":19682537,"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-07T20:32:35.735Z","updated_at":"2025-12-19T10:30:14.652Z","avatar_url":"https://github.com/devture.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\n\nFinds all `{sourceLanguage}.json` files (example: `en.json`) in a given base directory (`base_path`)\nand allows these files to be translated to all given languages (`locales`).\n\nA `{targetLanguage}.json` file is generated and saved next to `{sourceLanguage}.json` for each locale, whenever the translations for it are saved.\n\nA `{targetLanguage}.json.hash` file is also saved in the same directory.\nIt contains \"hints\" telling the translation system which source translation string a given translation is derived from.\nThis is so that a translation can be considered outdated if the source translation string changes.\nAt this moment, such outdated translations are considered new and untranslated.\n\n# Installation\n\n## Permissions\n\nSince the translation system needs to save translation files in the project, we need to grant file-writing privileges\nto the web server user.\n\nExample:\n\n\t$ find /srv/http/my-project/src -type d -name translations | xargs chown :http\n\t$ find /srv/http/my-project/src -type d -name translations | xargs chmod g+w\n\n## Configuration\n\nTranslationBundle config:\n\n\t\"TranslationBundle\": {\n\t\t\"source_language_locale_key\": \"en\",\n\t\t\"base_path\": \"%app_base_path%\",\n\t\t\"locales\": \"%locales%\"\n\t}\n\nTranslationBundle config example:\n\n\t\"TranslationBundle\": {\n\t\t\"source_language_locale_key\": \"en\",\n\t\t\"base_path\": \"/srv/http/my-project/src\",\n\t\t\"locales\": {\n\t\t\t\"en\": {\"key\": \"en\", \"name\": \"English\"},\n\t\t\t\"bg\": {\"key\": \"bg\", \"name\": \"Bulgarian\"},\n\t\t\t\"ja\": {\"key\": \"ja\", \"name\": \"Japanese\"}\n\t\t}\n\t}\n\n\n## Initialization\n\nOnly set-up during debug to protect the production environment:\n\n\tif ($app['debug']) {\n\t\t$app-\u003eregister(new \\Devture\\Bundle\\TranslationBundle\\ServicesProvider('devture_translation', $app['config']['TranslationBundle']));\n\t\t$app-\u003emount('/admin/{locale}/translation/', $app['devture_translation.controllers_provider.management']);\n\t\t$app['devture_user.access_control']-\u003erequireRoleForRoutePrefix('devture_translation.', 'devture_translation');\n\t}\n\nThe main route would be `devture_translation.manage` (assuming the `devture_translation` namespace was used, as done above).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevture%2Fsilex-translation-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevture%2Fsilex-translation-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevture%2Fsilex-translation-bundle/lists"}