+ 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 => "html_lang_code")) {
+ $template->param(html_lang_code => htmllangcode($lang_code));
+ }
+ if ($template->query(name => "html_lang_dir")) {
+ $template->param(html_lang_dir => htmllangdir($lang_code));
+ }
+ if ($template->query(name => "lang_name")) {
+ $template->param(lang_name => languagename($lang_code));
+ }