aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-07-19 14:11:36 -0400
committerJoey Hess <joey@kitenet.net>2011-07-19 14:11:36 -0400
commit8512ae3ed5329a8aa69debc96f49eaa6dedeaae0 (patch)
tree94d25bdf3f15f4838c0b3f90eab3a5b2b595dd02 /IkiWiki
parent5eb8369924959d184717e87c9d35f04c0e41fe22 (diff)
parent739554622fa1caa6bcc0474ebbdcd9db3627389d (diff)
downloadikiwiki-8512ae3ed5329a8aa69debc96f49eaa6dedeaae0.tar
ikiwiki-8512ae3ed5329a8aa69debc96f49eaa6dedeaae0.tar.gz
Merge remote-tracking branch 'intrigeri/po'
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/po.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index aca3d4bf8..6410a1c66 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -343,6 +343,13 @@ sub pagetemplate (@) {
if ($template->query(name => "istranslatable")) {
$template->param(istranslatable => istranslatable($page));
}
+ my $lang_code = istranslation($page) ? lang($page) : $master_language_code;
+ if ($template->query(name => "lang_code")) {
+ $template->param(lang_code => $lang_code);
+ }
+ if ($template->query(name => "lang_name")) {
+ $template->param(lang_name => languagename($lang_code));
+ }
if ($template->query(name => "HOMEPAGEURL")) {
$template->param(homepageurl => homepageurl($page));
}