File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -307,16 +307,16 @@ parts of your application and mocking it in your tests.
307
307
308
308
Instead of translating a string at the time of creation, you can use a
309
309
"translatable object", which is an instance of the
310
- :class: `Symfony\\ Component\\ Translation\\ Translatable ` class. This object stores
310
+ :class: `Symfony\\ Component\\ Translation\\ TranslatableMessage ` class. This object stores
311
311
all the information needed to fully translate its contents when needed::
312
312
313
- use Symfony\Component\Translation\Translatable ;
313
+ use Symfony\Component\Translation\TranslatableMessage ;
314
314
315
315
// the first argument is required and it's the original message
316
- $message = new Translatable ('Symfony is great!');
316
+ $message = new TranslatableMessage ('Symfony is great!');
317
317
// the optional second argument defines the translation parameters and
318
318
// the optional third argument is the translation domain
319
- $status = new Translatable ('order.status', ['%status%' => $order->getStatus()], 'store');
319
+ $status = new TranslatableMessage ('order.status', ['%status%' => $order->getStatus()], 'store');
320
320
321
321
Templates are now much simpler because you can pass translatable objects to the
322
322
``trans `` filter:
You can’t perform that action at this time.
0 commit comments