{"id":18634672,"url":"https://github.com/tacoberu/fluent-php","last_synced_at":"2025-04-11T07:33:34.951Z","repository":{"id":57064436,"uuid":"241699434","full_name":"tacoberu/fluent-php","owner":"tacoberu","description":"PHP implementation of Project Fluent. Localization library for expressive translations. Spec and documentation https://projectfluent.org","archived":false,"fork":false,"pushed_at":"2023-10-06T23:29:20.000Z","size":32,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T11:11:21.542Z","etag":null,"topics":[],"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/tacoberu.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":"2020-02-19T18:54:16.000Z","updated_at":"2020-11-23T01:41:03.000Z","dependencies_parsed_at":"2024-11-07T05:33:08.315Z","dependency_job_id":null,"html_url":"https://github.com/tacoberu/fluent-php","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"afb747381adcba2cf0605ab6d598dc78cdb0673c"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacoberu%2Ffluent-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacoberu%2Ffluent-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacoberu%2Ffluent-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacoberu%2Ffluent-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tacoberu","download_url":"https://codeload.github.com/tacoberu/fluent-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248358919,"owners_count":21090448,"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-07T05:20:29.340Z","updated_at":"2025-04-11T07:33:34.614Z","avatar_url":"https://github.com/tacoberu.png","language":"PHP","readme":"Project Fluent [![Build Status][travisimage]][travislink]\n=========================================================\n\n[travisimage]: https://travis-ci.org/tacoberu/fluent-php.svg?branch=master\n[travislink]: https://travis-ci.org/tacoberu/fluent-php\n\nThis is a (***uncomplete***) PHP implementation of Project Fluent, a localization framework\ndesigned to unleash the entire expressive power of natural language\ntranslations.\n\nProject Fluent keeps simple things simple and makes complex things possible.\nThe syntax used for describing translations is easy to read and understand.  At\nthe same time it allows, when necessary, to represent complex concepts from\nnatural languages like gender, plurals, conjugations, and others.\n\n\nLearn the FTL syntax\n--------------------\n\nFTL is a localization file format used for describing translation resources.\nFTL stands for _Fluent Translation List_.\n\nFTL is designed to be simple to read, but at the same time allows to represent\ncomplex concepts from natural languages like gender, plurals, conjugations, and\nothers.\n\n    hello-user = Hello, { $username }!\n\n[Read the Fluent Syntax Guide][] in order to learn more about the syntax.  If\nyou're a tool author you may be interested in the formal [EBNF grammar][].\n\n[Read the Fluent Syntax Guide]: http://projectfluent.org/fluent/guide/\n[EBNF grammar]: https://github.com/projectfluent/fluent/tree/master/spec\n\n\nInstallation\n------------\n\nThe recommended way to install is via Composer:\n\n        composer require tacoberu/fluent-intl\n\n\n\nUsage\n-----\n\n```php\n\nrequire __dir__ . '/vendor/autoload.php';\n\nuse Taco\\FluentIntl\\FluentTranslator;\nuse Taco\\FluentIntl\\FluentResource;\n\n$translator = new FluentTranslator(\"en-US\");\n$translator-\u003eaddResource(new FluentResource('\n-brand-name = Foo 3000\nwelcome = Welcome, {$name}, to {-brand-name}!\ngreet-by-name = Hello, { $name }!\nemails =\n    { $unreadEmails -\u003e\n        [1] You have one unread email.\n       *[other] You have { $unreadEmails } unread emails.\n    }\n'));\n\n$msg = $translator-\u003egetMessage(\"welcome\");\ndump($translator-\u003eformatPattern($msg-\u003evalue, [\"name\" =\u003e \"Anna\"]));\n// Welcome, Anna, to Foo 3000!\n\n$msg = $translator-\u003egetMessage(\"emails\");\ndump($translator-\u003eformatPattern($msg-\u003evalue, [\"unreadEmails\" =\u003e 5]));\n// You have 5 unread emails.\n\n```\n\n\nStatus\n------\n\nOnly part of the specification implemented.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftacoberu%2Ffluent-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftacoberu%2Ffluent-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftacoberu%2Ffluent-php/lists"}