Here is a patch for the [[plugins/meta]] plugin. It adds the possibility to define the language
-used for a page, with \[[meta lang="ja"]]
+used for a page, with \[[!meta lang="ja"]]
It doesn't insert the langage information in the xhtml meta elements, but defines a LANG
variable to use in the templates, for example with
my %authorurl;
+my %lang;
- sub import { #{{{
+ sub import {
hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1);
@@ -100,6 +101,11 @@
$meta{$page}.='<link href="'.encode_entities($value).
+ $template->param(lang => $lang{$page})
+ if exists $lang{$page} && $template->query(name => "lang");
- } # }}}
+ }
</pre>
> Please resolve lang somewhere reusable rather than within meta plugin: It is certainly usable outside