{"id":18929502,"url":"https://github.com/thecodingmachine/utils.i18n.fine.common","last_synced_at":"2025-04-15T15:31:04.985Z","repository":{"id":26449632,"uuid":"29900717","full_name":"thecodingmachine/utils.i18n.fine.common","owner":"thecodingmachine","description":"This is a package for internationalization. It has function to use fine easily","archived":false,"fork":false,"pushed_at":"2016-10-03T09:57:58.000Z","size":181,"stargazers_count":0,"open_issues_count":3,"forks_count":3,"subscribers_count":17,"default_branch":"4.0","last_synced_at":"2025-04-11T18:59:52.324Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecodingmachine.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2015-01-27T06:27:11.000Z","updated_at":"2016-07-21T16:02:42.000Z","dependencies_parsed_at":"2022-08-29T15:51:26.166Z","dependency_job_id":null,"html_url":"https://github.com/thecodingmachine/utils.i18n.fine.common","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.i18n.fine.common","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.i18n.fine.common/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.i18n.fine.common/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.i18n.fine.common/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/utils.i18n.fine.common/tar.gz/refs/heads/4.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249097865,"owners_count":21212363,"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-08T11:33:06.961Z","updated_at":"2025-04-15T15:31:04.699Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"What is this package\n====================\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/thecodingmachine/utils.i18n.fine.common/badges/quality-score.png?b=4.0)](https://scrutinizer-ci.com/g/thecodingmachine/utils.i18n.fine.common/?branch=4.0)\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/a208129a-0776-4c11-b7cf-fecb6f957def/small.png)](https://insight.sensiolabs.com/projects/a208129a-0776-4c11-b7cf-fecb6f957def)\n\nIf you are not familiar with Fine, you should stop reading **right now**! Please [get started with the main presentation](http://mouf-php.com/packages/mouf/utils.i18n.fine.translation-interface/README.md).\n\nLanguage detection is a PHP internationalisation package, it depends of translation-interface package.\nThis package contains many class to return the selected language for internationalisation.\n\nIt's could be with :\n- Browser detection,\n- fix language,\n- data set in session,\n- a link between domain name and language\n- a cascading of many solutions.\n    \nThe language can be used to translate message in fine or whatever.\n\nDependencies\n------------\n\nFine comes as a *Composer* package and requires the \"Mouf\" framework to run.\nThe first step is therefore to [install Mouf](http://www.mouf-php.com/).\n\nOnce Mouf is installed, you can process to the Fine installation.\n\nInstall Fine\n--------------\n\nAt the same time please add a translation store system link utils.i18n.fine.file-translator, or another.\nEdit your *composer.json* file, and add a dependency on *mouf/utils.i18n.fine.common*.\n\nA minimal *composer.json* file might look like this:\n```\n\t{\n\t    \"require\": {\n\t        \"mouf/mouf\": \"~2.0\",\n\t        \"mouf/utils.i18n.fine.common\": \"4.0.*\"\n\t    },\n\t    \"autoload\": {\n\t        \"psr-0\": {\n\t            \"Test\": \"src/\"\n\t        }\n\t    },\n\t    \"minimum-stability\": \"dev\"\n\t}\n```\nAs explained above, Fine is a package of the Mouf framework. Mouf allows you (amoung other things) to visualy \"build\" your project's dependencies and instances.\n\nTo install the dependency, run\n\n\tphp composer.phar install\n\nThis package contains\n---------------------\n\n###Installer\n\n[The installer creates a default instance and automatically binds the translator.](doc/install.md)\n\n###Default class\n\nThis package adds a fine cascading translator to bind many instances of `TranslatorInterface`. The first translation found is returned, also the next translation is checked.\nEdit the instance in Mouf to add or change the order in cascading translator.\n\n###Functions\n\nThere are 2 functions added to make translations easier:\n\n- `iMsg` function: Returns the translation of the key, parameters (in option) and LanguageDetection (in option)\n- `eMsg` function: Do an echo of `iMsg`\n\n[Read the documentation to use it](doc/using.md)\n\n###Interface\n\nThe interface `EditTranslationInterface` can be implemented to use the Mouf interface on the translator. Many new methods must be implemented to recover, save and edit a translation.\n[Read the documentation](doc/implement.md)\n\n###Trait\n\nYou can use this trait to implement some method of the interface.\n\n### Twig extension\n\nThis package contains the `FineTwigExtension` that will add the `t` filter to your Twig templates.\n \nUse like this:\n\n```twig\n{{ \"my_key\"| t }}\n```\n\nPlease notice that the `FineTwigExtension` is appended to your Mouf instances only if a twig instance is already available in Mouf.\nIf this package was installed *before* the *mouf/html.renderer.twig-exentensions* package, you might need to re-run the installer to installer the extension.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Futils.i18n.fine.common","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Futils.i18n.fine.common","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Futils.i18n.fine.common/lists"}