X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/50d2704db6fec29756e930d82aecca67802a063e..b632d426422b7ff424eaae387cce60f9c1e7c448:/IkiWiki/Plugin/po.pm?ds=inline 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)); }