Skip to content

Commit

Permalink
Added example TT2 template for the language switch.
Browse files Browse the repository at this point in the history
  • Loading branch information
mendel committed Dec 1, 2009
1 parent 6ef77a1 commit c8245f4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile.PL
Expand Up @@ -9,6 +9,7 @@ use Module::Install::AuthorRequires 0.02;
use Module::Install::ReadmeFromPod 0.06;
use Module::Install::Repository 0.06;
use Module::Install::ExtraTests 0.006;
use Module::Install::Share 0.91;

name 'Catalyst-Plugin-LanguagePrefix';
all_from 'lib/Catalyst/Plugin/LanguagePrefix.pm';
Expand Down Expand Up @@ -47,4 +48,6 @@ extra_tests;

auto_install;

install_share;

WriteAll;
3 changes: 2 additions & 1 deletion lib/Catalyst/Plugin/LanguagePrefix.pm
Expand Up @@ -383,7 +383,8 @@ language prefix replaced).
=back
TODO include example TT2 template for the language switch
You can find an example TT2 HTML template for the language switch included in
the distribution.
=cut

Expand Down
7 changes: 7 additions & 0 deletions share/templates/tt/xhtml/language_switch.tt2
@@ -0,0 +1,7 @@
<div id="language-switch">
[%~ FOREACH choice IN c.language_switch_options.pairs %]
<div class="language-switch-choice">
<a class="language-switch-language-link" title="[% choice.value.name %]" href="[% choice.value.uri %]">[% choice.key %]</a>
</div>
[%~ END %]
</div>

0 comments on commit c8245f4

Please sign in to comment.