Merge pull request #1390 from Anahkiasen/feature/url_language

Add URL::to_language and HTML::link_to_language localization helpers
This commit is contained in:
Taylor Otwell
2013-01-05 12:46:43 -08:00
5 changed files with 83 additions and 3 deletions

View File

@@ -59,6 +59,17 @@ Sometimes you may need to generate a URL to a named route, but also need to spec
$url = URL::to_action('user@profile', array($username));
<a name="urls-to-a-different-language"></a>
## URLs To A Different Language
#### Generating a URL to the same page in another language:
$url = URL::to_language('fr');
#### Generating a URL to your home page in another language:
$url = URL::to_language('fr', true);
<a name="urls-to-assets"></a>
## URLs To Assets

View File

@@ -87,6 +87,17 @@ For example, the < symbol should be converted to its entity representation. Conv
echo HTML::link_to_action('user@profile', 'User Profile', array($username));
<a name="links-to-a-different-language"></a>
## Links To A Different Language
#### Generating a link to the same page in another language:
echo HTML::link_to_language('fr');
#### Generating a link to your home page another language
echo HTML::link_to_language('fr', true);
<a name="mail-to-links"></a>
## Mail-To Links