Showing 10 of 1,280 results.

Example Use | Laravel 5: String Translation Public API

The following example will resolve a translator instance from the service container and get the current MessageSelector instance. 1 <?php 2 // Ask the Service Container for a translator instance. 3 $ translator = app ( ' translator ' ) ; 4 5 //...

Example Use | Laravel 5: String Translation Public API

In the following example, we will extend the MessageSelector to return always return the same string when resolving a translation line using the choice and transChoice methods: 1 <?php 2 3 use Illuminate \ Translation \ MessageSelector ; 4 5 class...

Example Use | Laravel 5: String Translation Public API

In the following example, we will change the translator's default locale to es : 1 // Ask the Service Container for a translator instance. 2 $ translator = app ( ' translator ' ) ; 3 4 // Change the default locale to `es`. 5 $ translator ->...

Filter Search