laravel/laravel — pull request #1390 by Anahkiasen (2012-10-26 21:36:15+00:00)
Title: Add URL::to_language and HTML::link_to_language localization helpers

This adds two helpers for a very common task in localized websites : creating links that point to different languages. The functions are very straightforward :

```php
// Points to the french version, keeping current page
URL::to_language('fr')

// Points to the french version, reseting page to home (mywebsite/fr/)
URL::to_language('fr', true)

// Generate a link to another language
HTML::link_to_language('fr', 'French version')
```

There's room for improvement so I'm waiting for your opinions on this.