+ my $translation = $translation_mapping{$locale} // 'en';
+ my $doc;
+ if (-r "../templates/$filename.$translation.xml") {
+ $parms->{'html/xml:lang'} = $translation;
+ $doc = XML::Template::process_file("../templates/$filename.$translation.xml", $parms);
+ } else {
+ $doc = XML::Template::process_file("../templates/$filename.xml", $parms);
+ }