{"id":28791980,"url":"https://github.com/deanc/silex-web-translator","last_synced_at":"2025-07-07T14:35:46.873Z","repository":{"id":56964425,"uuid":"43437391","full_name":"deanc/silex-web-translator","owner":"deanc","description":"A small little provider that can be easily mounted to Silex apps to give a web translation interface","archived":false,"fork":false,"pushed_at":"2015-10-14T08:10:11.000Z","size":552,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T00:38:43.370Z","etag":null,"topics":["dashboard","i18n","php","silex","silex-provider","silex2","translation-management"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/deanc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-30T14:21:04.000Z","updated_at":"2020-05-03T15:41:39.000Z","dependencies_parsed_at":"2022-08-21T10:20:19.147Z","dependency_job_id":null,"html_url":"https://github.com/deanc/silex-web-translator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deanc/silex-web-translator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanc%2Fsilex-web-translator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanc%2Fsilex-web-translator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanc%2Fsilex-web-translator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanc%2Fsilex-web-translator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deanc","download_url":"https://codeload.github.com/deanc/silex-web-translator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanc%2Fsilex-web-translator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260660555,"owners_count":23043521,"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":["dashboard","i18n","php","silex","silex-provider","silex2","translation-management"],"created_at":"2025-06-18T00:31:14.213Z","updated_at":"2025-07-07T14:35:46.861Z","avatar_url":"https://github.com/deanc.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Silex Web Translator\n\n## Introduction\n\nThis Silex Provider allows you to easily manage the translation files for your app via a web-based interface. Current features include:\n\n* Dashboard for a quick overview of the current status of translations for your app including total translations, total locales and total untranslated strings.\n\n![dashboard](https://github.com/deanc/silex-web-translator/raw/master/screenshots/dashboard.png)\n\n* A simple editor for translation strings, allowing you to quickly see which translation strings are missing for each locale\n\n![translation screen 1](https://github.com/deanc/silex-web-translator/raw/master/screenshots/translations_primary.png)\n![translation screen 2](https://github.com/deanc/silex-web-translator/raw/master/screenshots/translations_secondary.png)\n\n## Requirements\n\n* PHP 5.4+\n* Using YAML files for your translations. They *must* be formatted as `\u003cdomain\u003e.\u003clocale\u003e.yml`. If you aren't using the domains featured of the Symfony `Translation` component then make sure you name your translation files `messages.\u003clocale\u003e.yml`.\n* For all usage of locales in your app use the ISO 639-1 language code, an underscore (_), then the ISO 3166-1 alpha-2 country code (e.g. fr_FR for French/France).\n* Make sure you configure *all* locales as fallbacks when setting up the `TranslationProvider`.\n\n## Installation\n\n* Configuration the default Silex TranslationServiceProvider in a similar way:\n\n```php\n$app['locale'] = 'en_GB';\n$app-\u003eregister(new Silex\\Provider\\TranslationServiceProvider(), array(\n    'locale_fallbacks' =\u003e array('en_GB', 'fr_FR', 'fi_FI'),\n));\n\n$app['translator'] = $app-\u003eshare($app-\u003eextend('translator', function($translator, $app) {\n\n    $translator-\u003eaddLoader('yaml', new Symfony\\Component\\Translation\\Loader\\YamlFileLoader());\n\n    $translator-\u003eaddResource('yaml', __DIR__.'/../translations/messages.en_GB.yml', 'en_GB');\n    $translator-\u003eaddResource('yaml', __DIR__.'/../translations/messages.fr_FR.yml', 'fr_FR');\n    $translator-\u003eaddResource('yaml', __DIR__.'/../translations/messages.fi_FI.yml', 'fi_FI');\n    $translator-\u003eaddResource('yaml', __DIR__.'/../translations/rules.en_GB.yml', 'en_GB', 'rules');\n\n    return $translator;\n}));\n```\n\n* Make sure you are using and have registered the following service providers:\n\n```php\n$app-\u003eregister(new Silex\\Provider\\ServiceControllerServiceProvider());\n$app-\u003eregister(new Silex\\Provider\\UrlGeneratorServiceProvider());\n$app-\u003eregister(new Silex\\Provider\\FormServiceProvider());\n$app-\u003eregister(new Silex\\Provider\\ValidatorServiceProvider());\n$app-\u003eregister(new Silex\\Provider\\TwigServiceProvider());\n```\n        \n* Register the service provider and configure the options\n\n```php\n$app['webtranslator.options'] = array(\n    'translator_file_path' =\u003e __DIR__ . '/../translations/'\n);\n$app-\u003eregister(new DC\\WebTranslator\\Provider\\WebTranslatorServiceProvider());\n```\n        \n* Mount the controller provider\n\n```php\n$app-\u003emount('/webtranslator', new DC\\WebTranslator\\Controller\\WebTranslatorControllerProvider());\n```\n\n## FAQ\n\nHow to protect the interface with user authentication?\n\n* You can protect the route you mount the controller on, as you would any other route, using the Symfony security component.\n\n## Known issues\n\n* If you import nested YML files with pretty new line (pipe) syntax, it will replace new lines with \\r\\n\n\n## Thanks/Credits\n\n* Big thanks to StartBootstrap for a few styles for the admin: https://github.com/IronSummitMedia/startbootstrap-sb-admin","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanc%2Fsilex-web-translator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeanc%2Fsilex-web-translator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanc%2Fsilex-web-translator/lists"}