Skip to content

Instantly share code, notes, and snippets.

@smarek
Last active September 19, 2019 14:11
Show Gist options
  • Select an option

  • Save smarek/1c69c9f3d4384a98d481837bb0351262 to your computer and use it in GitHub Desktop.

Select an option

Save smarek/1c69c9f3d4384a98d481837bb0351262 to your computer and use it in GitHub Desktop.

Revisions

  1. smarek renamed this gist Sep 19, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. smarek created this gist Sep 19, 2019.
    9 changes: 9 additions & 0 deletions cakephp i18n language link
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    <?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']));
    ?>