PHPackages                             yiisoft/translator-formatter-simple - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. yiisoft/translator-formatter-simple

Abandoned → [yiisoft/translator](/?search=yiisoft%2Ftranslator)ArchivedLibrary[Framework](/categories/framework)

yiisoft/translator-formatter-simple
===================================

Yii Translator Simple Message Formatter

1.0.0(5y ago)42.1k5BSD-3-ClausePHPPHP ^7.4|^8.0

Since May 13Pushed 3y ago11 watchersCompare

[ Source](https://github.com/yiisoft/translator-formatter-simple)[ Packagist](https://packagist.org/packages/yiisoft/translator-formatter-simple)[ Docs](https://www.yiiframework.com/)[ GitHub Sponsors](https://github.com/yiisoft)[ Fund](https://opencollective.com/yiisoft)[ RSS](/packages/yiisoft-translator-formatter-simple/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (2)Used By (0)

  **This package is deprecated and is now part of [yiisoft/translator](https://github.com/yiisoft/translator).**

 ❌

---

 [ ![](https://camo.githubusercontent.com/8317c17418b39410a660f5149071d26c5023c0d5fb2b7ebb771324812f666d73/68747470733a2f2f796969736f66742e6769746875622e696f2f646f63732f696d616765732f7969695f6c6f676f2e737667) ](https://github.com/yiisoft)

Yii Translator Simple Message Formatter
=======================================

[](#yii-translator-simple-message-formatter)

[![Latest Stable Version](https://camo.githubusercontent.com/9298b06d0489906a8eccf66eaab3abb155d0de4c8bc5808163b0e33feedf0963/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f7472616e736c61746f722d666f726d61747465722d73696d706c652f762f737461626c652e706e67)](https://packagist.org/packages/yiisoft/translator-formatter-simple)[![Total Downloads](https://camo.githubusercontent.com/bcd4dd56cf0c274947d6930eb1e5ecf10a11cbd345e81711c36d3dccc39d038f/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f7472616e736c61746f722d666f726d61747465722d73696d706c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/yiisoft/translator-formatter-simple)[![Build status](https://github.com/yiisoft/translator-formatter-simple/workflows/build/badge.svg)](https://github.com/yiisoft/translator-formatter-simple/actions?query=workflow%3Abuild)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b8275f10c641fb780b001fc211d88504cefd110cf8519c3e71953daca0b4ba17/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f796969736f66742f7472616e736c61746f722d666f726d61747465722d73696d706c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/yiisoft/translator-formatter-simple/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/fc5307fd8e77f4c8540bdde8bcac2495dd1fdb0049a7fb7f028d56cfb983d991/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f796969736f66742f7472616e736c61746f722d666f726d61747465722d73696d706c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/yiisoft/translator-formatter-simple/?branch=master)[![Mutation testing badge](https://camo.githubusercontent.com/f7c2fd853be1ca0267b1caec8b7d5ed185aba2161d6aff8ec17dbf5635c4d06b/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d253246796969736f66742532467472616e736c61746f722d666f726d61747465722d73696d706c652532466d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/translator-formatter-simple/master)[![static analysis](https://github.com/yiisoft/translator-formatter-simple/workflows/static%20analysis/badge.svg)](https://github.com/yiisoft/translator-formatter-simple/actions?query=workflow%3A%22static+analysis%22)[![type-coverage](https://camo.githubusercontent.com/54c9f6fc198831ffff82c75688c62b26ced89c45bdc50d16047d8238cd8c10eb/68747470733a2f2f73686570686572642e6465762f6769746875622f796969736f66742f7472616e736c61746f722d666f726d61747465722d73696d706c652f636f7665726167652e737667)](https://shepherd.dev/github/yiisoft/translator-formatter-simple)

This package allow to format messages in simple mode. When translating a message, you can embed some placeholders and have them replaced by dynamic parameter values.

Requirements
------------

[](#requirements)

- PHP 7.4 or higher.

Installation
------------

[](#installation)

The package could be installed with composer:

```
composer require yiisoft/translator-formatter-simple --prefer-dist

```

Configuration
-------------

[](#configuration)

In case you use [`yiisoft/config`](http://github.com/yiisoft/config), you will get configuration automatically. If not, the following DI container configuration is necessary:

```
