<<

NAME

LangInstaller.pm - Handle templates and preferences translation

SYNOPSYS

  my $installer = LangInstaller->new( 'fr-FR' );
  $installer->create();
  $installer->update();
  $installer->install();
  for my $lang ( @{$installer->{langs} ) {
    $installer->set_lang( $lan );
    $installer->install();
  }

METHODS

new

Create a new instance of the installer object.

create

For the current language, create .po files for templates and preferences based of the english ('en') version.

update

For the current language, update .po files.

install

For the current langage $self-{lang}, use .po files to translate the english version of templates and preferences files and copy those files in the appropriate directory.

translate create lang

Create 4 kinds of .po files in po subdirectory: (1) one from each theme on opac pages templates, (2) intranet templates and help, (3) preferences, and (4) one for each MARC dialect.

lang-opac-{theme}.po

Contains extracted text from english (en) OPAC templates found in <KOHA_ROOT>/koha-tmpl/opac-tmpl/{theme}/en/ directory.

lang-staff-prog.po and lang-staff-help.po

Contains extracted text from english (en) intranet templates found in <KOHA_ROOT>/koha-tmpl/intranet-tmpl/prog/en/ directory.

lang-pref.po

Contains extracted text from english (en) preferences. They are found in files located in <KOHA_ROOT>/koha-tmpl/intranet-tmpl/prog/en/admin/preferences directory.

lang-marc-{MARC}.po

Contains extracted text from english (en) files from opac and intranet, related with MARC dialects.

pref-trans update lang

Update .po files in po directory, named lang-*.po.

pref-trans install lang

<<