{"id":22423499,"url":"https://github.com/qbbr/localeconfiguratorbundle","last_synced_at":"2026-04-19T10:32:21.867Z","repository":{"id":65129497,"uuid":"582558965","full_name":"qbbr/LocaleConfiguratorBundle","owner":"qbbr","description":"Simple configuration on locale","archived":false,"fork":false,"pushed_at":"2023-12-14T15:22:57.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-12-14T16:36:06.333Z","etag":null,"topics":["configuration","locale","php","symfony","symony-bundle"],"latest_commit_sha":null,"homepage":"","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/qbbr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-27T07:51:49.000Z","updated_at":"2023-12-14T16:36:06.335Z","dependencies_parsed_at":"2024-12-05T18:11:38.867Z","dependency_job_id":"c8a13065-2d3b-4b57-9acc-6b4648424f19","html_url":"https://github.com/qbbr/LocaleConfiguratorBundle","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"purl":"pkg:github/qbbr/LocaleConfiguratorBundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbbr%2FLocaleConfiguratorBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbbr%2FLocaleConfiguratorBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbbr%2FLocaleConfiguratorBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbbr%2FLocaleConfiguratorBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qbbr","download_url":"https://codeload.github.com/qbbr/LocaleConfiguratorBundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbbr%2FLocaleConfiguratorBundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265942569,"owners_count":23853294,"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":["configuration","locale","php","symfony","symony-bundle"],"created_at":"2024-12-05T18:11:35.168Z","updated_at":"2026-04-19T10:32:21.814Z","avatar_url":"https://github.com/qbbr.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LocaleConfiguratorBundle\n\nSimple configuration on locale.\n\n[![Tests](https://github.com/qbbr/LocaleConfiguratorBundle/workflows/Tests/badge.svg)](https://github.com/qbbr/LocaleConfiguratorBundle/actions)\n[![Latest Stable Version](https://poser.pugx.org/qbbr/locale-configurator-bundle/v/stable)](https://packagist.org/packages/qbbr/locale-configurator-bundle)\n[![Total Downloads](https://poser.pugx.org/qbbr/locale-configurator-bundle/downloads)](https://packagist.org/packages/qbbr/locale-configurator-bundle)\n[![License](https://poser.pugx.org/qbbr/locale-configurator-bundle/license)](https://packagist.org/packages/qbbr/locale-configurator-bundle)\n[![PHP Version Require](http://poser.pugx.org/qbbr/locale-configurator-bundle/require/php)](https://packagist.org/packages/qbbr/locale-configurator-bundle)\n\n## Installation\n\n### Step 1: Download the Bundle\n\n```bash\ncomposer require qbbr/locale-configurator-bundle\n```\n\n### Step 2: Enable the Bundle\n\n```php\n// config/bundles.php\n\nreturn [\n    // ...\n    Qbbr\\LocaleConfiguratorBundle\\LocaleConfiguratorBundle::class =\u003e ['all' =\u003e true],\n];\n```\n\n## Configuration\n\n#### Config structure\n\n```\nconfig/locale_configurator/\n├── _default.yaml\n├── en.yaml\n├── ru.yaml\n└── ...\n```\n\nlogic: `config = merge(_default.yaml, locale.yaml)`\n\n#### Parameters by default\n\nu can override it.\n\n```yaml\nparameters:\n    qbbr.locale_configurator.config_dir: '%kernel.project_dir%/config/locale_configurator'\n    qbbr.locale_configurator.raise_not_found_param_exception: false\n```\n\n## Usage\n\n### PHP\n\n```php\nuse Qbbr\\LocaleConfiguratorBundle\\Configurator\\LocaleConfigurator;\n\nclass SomeService\n{\n    private LocaleConfigurator $lc;\n\n    public function __construct(\n        LocaleConfigurator $lc\n    ) {\n        $this-\u003elc = $lc;\n    }\n\n    public function something()\n    {\n        // $this-\u003elc-\u003esetLocale('ru');\n        $param1 = $this-\u003elc-\u003eget('param1');\n    }\n}\n```\n\n### Twig\n\nhas `lc_has`/`lc_get` fn.\n\n```jinja\n{% if lc_has('param1') %}\n    ...\n{% endif %}\n\n{% set param1 = lc_get('param1') %}\n```\n\n## Tests\n\n```bash\n./vendor/bin/phpunit Tests/ -v --testdox\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbbr%2Flocaleconfiguratorbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqbbr%2Flocaleconfiguratorbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbbr%2Flocaleconfiguratorbundle/lists"}