Add URL::to_language and HTML::link_to_language localization helpers

Signed-off-by: Anahkiasen <ehtnam6@gmail.com>
This commit is contained in:
Anahkiasen
2012-10-26 22:32:52 +01:00
parent 205cc4869d
commit 89e3bf1fbd
5 changed files with 84 additions and 4 deletions

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
@@ -119,7 +130,7 @@ The "mailto" method on the HTML class obfuscates the given e-mail address so it
echo HTML::ol(array('Get Peanut Butter', 'Get Chocolate', 'Feast'));
echo HTML::ul(array('Ubuntu', 'Snow Leopard', 'Windows'));
echo HTML::dl(array('Ubuntu' => 'An operating system by Canonical', 'Windows' => 'An operating system by Microsoft'));
<a name="custom-macros"></a>