# supports.
my $wanted;
if ($params->{language}) {
- $wanted = [$params->{language}];
+ # We can pass several languages at once as an arrayref
+ # or a single language.
+ $wanted = $params->{language};
+ $wanted = [$wanted] unless ref $wanted;
}
else {
$wanted = _wanted_languages();
sub template_include_path {
my ($params) = @_;
- my @used_languages = include_languages(@_);
+ my @used_languages = include_languages($params);
# Now, we add template directories in the order they will be searched:
my $template_dirs = _template_base_directories();
print install_string('template_precompile') if $output;
- my $paths = template_include_path();
+ # Pre-compile all available languages.
+ my $paths = template_include_path({ language => Bugzilla->languages });
foreach my $dir (@$paths) {
my $template = Bugzilla::Template->create(include_path => [$dir]);