Skip to content

Commit e2fd5fa

Browse files
committed
Small fixes
1 parent dee7fb2 commit e2fd5fa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

components/translation/custom_formats.rst

+3-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ loader (to load translations) and, optionally, a dumper (to dump translations).
1010

1111
Let's imagine you have a custom format where translation messages are defined
1212
using one line for each translation and parenthesis to wrap the key and the
13-
message. A translation file would look like this:
13+
message. A translation file would look like this::
1414

1515
(welcome)(Bienvenido)
1616
(goodbye)(Adios)
@@ -22,14 +22,13 @@ new class that implements the
2222
which defines a
2323
:method:`Symfony\\Component\\Translation\\Loader\\LoaderInterface::load`
2424
method. In the loader, this method will get a filename and parse it to create an
25-
array. Then, it will create the catalog that will be returned.
25+
array. Then, it will create the catalog that will be returned::
2626

2727
use Symfony\Component\Translation\MessageCatalogue;
2828
use Symfony\Component\Translation\Loader\LoaderInterface;
2929

3030
class MyFormatLoader implements LoaderInterface
3131
{
32-
3332
public function load($resource, $locale, $domain = 'messages')
3433
{
3534
$messages = array();
@@ -62,12 +61,11 @@ It will print *"Bienvenido"*.
6261

6362
It is also possible to create a custom dumper for your format. To do so,
6463
a new class implementing the
65-
DumperInterface
6664
:class:`Symfony\\Component\\Translation\\Dumper\\DumperInterface`
6765
interface must be created.
6866
To write the dump contents into a file, extending the
6967
:class:`Symfony\\Component\\Translation\\Dumper\\FileDumper` class
70-
will save a few lines.
68+
will save a few lines::
7169

7270
use Symfony\Component\Translation\MessageCatalogue;
7371
use Symfony\Component\Translation\Dumper\FileDumper;

0 commit comments

Comments
 (0)