03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Multisites 208<br />

.<br />

This was extracted from app/routes.php.<br />

This functionality allows some pretty powerful domain-related configuration and logical branching!<br />

Translation<br />

Laravel 4 includes a translation system that can greatly simplify developing multisites. Translated<br />

phrases are stored in configuration files, and these can be returned in views.<br />

Using Language Lookups<br />

The simplest example of this requires two steps: we need to add the translated phrases and we need<br />

to recall them in a view. To begin with; we’re going to add a few English and Dutch phrases to the<br />

configuration files:<br />

1

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

Saved successfully!

Ooh no, something went wrong!