8000 [Translation][Debug] Add installation and minimal example to README · symfony/symfony@b52b7b9 · GitHub
[go: up one dir, main page]

Skip to content

Commit b52b7b9

Browse files
wouterjfabpot
authored andcommitted
[Translation][Debug] Add installation and minimal example to README
1 parent e02e74d commit b52b7b9

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

src/Symfony/Component/Debug/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,22 @@ Debug Component
33

44
The Debug component provides tools to ease debugging PHP code.
55

6+
Getting Started
7+
---------------
8+
9+
```
10+
$ composer install symfony/debug
11+
```
12+
13+
```php
14+
use Symfony\Component\Debug\Debug;
15+
16+
Debug::enable();
17+
```
18+
619
Resources
720
---------
821

9-
* [Documentation](https://symfony.com/doc/current/components/debug.html)
1022
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
1123
* [Report issues](https://github.com/symfony/symfony/issues) and
1224
[send Pull Requests](https://github.com/symfony/symfony/pulls)

src/Symfony/Component/Translation/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,28 @@ Translation Component
33

44
The Translation component provides tools to internationalize your application.
55

6+
Getting Started
7+
---------------
8+
9+
```
10+
$ composer require symfony/translation
11+
```
12+
13+
```php
14+
use Symfony\Component\Translation\Translator;
15+
16+
$translator = new Translator('fr_FR');
17+
$translator->addResource('array', [
18+
'Hello World!' => 'Bonjour !',
19+
], 'fr_FR');
20+
21+
echo $translator->trans('Hello World!'); // outputs « Bonjour ! »
22+
```
23+
624
Resources
725
---------
826

9-
* [Documentation](https://symfony.com/doc/current/components/translation.html)
27+
* [Documentation](https://symfony.com/doc/current/translation.html)
1028
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
1129
* [Report issues](https://github.com/symfony/symfony/issues) and
1230
[send Pull Requests](https://github.com/symfony/symfony/pulls)

0 commit comments

Comments
 (0)
0