{"id":18407525,"url":"https://github.com/simplecomplex/php-locale","last_synced_at":"2025-07-07T19:09:32.906Z","repository":{"id":57051272,"uuid":"95783031","full_name":"simplecomplex/php-locale","owner":"simplecomplex","description":"Locale and language feature; ini-file based and cached localized texts","archived":false,"fork":false,"pushed_at":"2019-04-08T08:19:19.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T04:42:40.874Z","etag":null,"topics":["internationalization","locale","localization","php","php7","psr"],"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/simplecomplex.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","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":"2017-06-29T13:54:56.000Z","updated_at":"2022-02-12T09:11:59.000Z","dependencies_parsed_at":"2022-08-24T05:10:52.508Z","dependency_job_id":null,"html_url":"https://github.com/simplecomplex/php-locale","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplecomplex%2Fphp-locale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplecomplex%2Fphp-locale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplecomplex%2Fphp-locale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplecomplex%2Fphp-locale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplecomplex","download_url":"https://codeload.github.com/simplecomplex/php-locale/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631682,"owners_count":21136562,"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":["internationalization","locale","localization","php","php7","psr"],"created_at":"2024-11-06T03:14:21.992Z","updated_at":"2025-04-12T21:14:13.693Z","avatar_url":"https://github.com/simplecomplex.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Locale ##\n\n### Localization, primarily of texts ###\n\nTexts are referred by (free format) IDs.  \n.ini-file based.\n\nSuperior to gettext (.po) in these ways:\n- texts (translations) don't get _orphaned_ when you change the source text  \n- editors/translators work in standard plaintext editors\n- texts can be organised in groups and sub groups.\n- no need for complex parsers and im-/export features, databases etc.\n- miniscule resource footprint\n\n### .ini-file example ###\n\n```ini\n[some-group]\nmeeting = reunión\nsome-sub-group[start] = ¡Hola!\nsome-sub-group[continue] = ¿Cómo estás?\nsome-sub-group[end] = Hasta luego...\n```\n\n### Dependency injection container ID: locale ###\n\nRecommendation: access (and thus instantiate) locale via DI container ID 'locale'.  \nSee [SimpleComplex Utils](https://github.com/simplecomplex/php-utils) ``` Dependency ```.\n\n### CLI commands ###\n\n```bash\n# List all locale-text commands and their help.\nphp cli.php locale-text -h\n# One command's help.\nphp cli.php locale-text-xxx -h\n\n# Display/get value of a locale-text item.\nphp cli.php locale-text-get language section key\n\n# Set a locale-text item.\nphp cli.php locale-text-set language section key value\n\n# Delete a locale-text item.\nphp cli.php locale-text-delete language section key\n\n# Refresh a locale-text store from .locale-text.[language].ini file sources.\nphp cli.php locale-text-refresh language\n\n# Export a locale-text store as JSON to a file.\nphp cli.php locale-text-export language target-path-and-file\n```\n\n### Installation ###\n\nCopy the 'global' config .ini file (see [SimpleComplex Config](https://github.com/simplecomplex/php-config))  \n```[locale package dir]/```**```config-ini/locale.global.ini```**  \nand place it in _config_'s 'base' or 'override' path.\n\nFollow the instructions within in that file,  \nand modify it to suit the current system's structure and features.\n\n### Requirements ###\n\n- PHP \u003e=7.0\n- [SimpleComplex Config](https://github.com/simplecomplex/php-config)\n- [SimpleComplex Utils](https://github.com/simplecomplex/php-utils)\n\n##### Suggestions #####\n\n- [SimpleComplex Inspect](https://github.com/simplecomplex/inspect)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplecomplex%2Fphp-locale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplecomplex%2Fphp-locale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplecomplex%2Fphp-locale/lists"}