Created
February 18, 2011 22:36
-
-
Save bigpresh/834545 to your computer and use it in GitHub Desktop.
D::P::I18n test case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package i18ntest::I18N::en; | |
use base 'i18ntest::I18N'; | |
our %Lexicon = ( hello => 'Hello' ); | |
package i18ntest::I18N::fr; | |
use base 'i18ntest::I18N'; | |
our %Lexicon = ( hello => 'Bonjour' ); | |
package i18ntest; | |
use Dancer ':syntax'; | |
use lib '/home/davidp/dev/github/dancer-plugin-i18n/lib'; | |
use Dancer::Plugin::I18n; | |
use Dancer::Plugin::DebugDump; | |
our $VERSION = '0.1'; | |
before_template sub { | |
shift->{codereftest} = sub { "Hello from coderef" }; | |
}; | |
get '/' => sub { | |
template 'index'; | |
}; | |
true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oh, <% l('hello') %>! | |
<br /> | |
<% # languages('fr') %> | |
Or, if you're French, <% l('hello') %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment