29.07.2016 Views

laravel-5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Localization<br />

• Introduction<br />

• Basic Usage A> - Pluralization<br />

• Overriding Vendor Language Files<br />

Introduction<br />

Laravel’s localization features provide a convenient way to retrieve strings in various languages,<br />

allowing you to easily support multiple languages within your application.<br />

Language strings are stored in files within the resources/lang directory. Within this directory there<br />

should be a subdirectory for each language supported by the application:<br />

.<br />

1 /resources<br />

2 /lang<br />

3 /en<br />

4 messages.php<br />

5 /es<br />

6 messages.php<br />

All language files simply return an array of keyed strings. For example:<br />

.<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!