Skip to content

Instantly share code, notes, and snippets.

@smarek smarek/default.php
Last active Sep 19, 2019

Embed
What would you like to do?
cakephp i18n language link
<?php
$parsed = Router::parseRequest($this->request);
unset($parsed['_matchedRoute']);
echo $this->Html->link('Čeština', array_merge($parsed, ['lang' => 'cz']));
echo ' | ';
echo $this->Html->link('English', array_merge($parsed, ['lang' => 'en']));
echo ' | ';
echo $this->Html->link('French', array_merge($parsed, ['lang' => 'fr']));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.