Skip to content

Commit

Permalink
HTML language codes
Browse files Browse the repository at this point in the history
  • Loading branch information
daxim committed Feb 16, 2010
1 parent ff10bf4 commit 0945113
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions crank
Expand Up @@ -100,6 +100,7 @@ MAIN: {
$vars->{body} = $textile->process( decode_utf8($first_pass) );
$vars->{currlang} = ( $desc eq 'Home' ) ? '' : $desc;
$vars->{rel_static} = ( 'C' eq $ENV{LANG} ) ? q() : q(../); # path prefix to static assets
$vars->{rfc_1766_lang} = ( 'C' eq $ENV{LANG} ) ? 'en' : [map {tr/_/-/;$_} $ENV{LANG}]->[0];
$tt->process( 'page.ttml', $vars, "$section.html", { binmode => ':encoding(UTF-8)' } )
|| die sprintf("file: %s\nerror: %s\n", "$section.html", $tt->error);
}
Expand Down
2 changes: 1 addition & 1 deletion tt/page.ttml
@@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="[% rfc_1766_lang %]" lang="[% rfc_1766_lang %]">
<head>
<title>bobby-tables.com: A guide to preventing SQL injection[% IF currlang %] in [% currlang %][% END %]</title>
<link rel="stylesheet" type="text/css" href="[% rel_static %]css/bobby.css" />
Expand Down

0 comments on commit 0945113

Please sign in to comment.