]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/po.pm
Merge branch 'master' of git://git.ikiwiki.info
[git.ikiwiki.info.git] / IkiWiki / Plugin / po.pm
index aca3d4bf86cf52afbe517ef43f83fdbc731a0eee..6410a1c663ceba0b615a6d3959bb27c3dd20b609 100644 (file)
@@ -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));
        }