<<

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 3 .po files in po subdirectory: (1) from opac pages templates, (2) intranet templates, and (3) from preferences.

lang-opac-{theme}.po

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

lang-intranet.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.

pref-trans update lang

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

pref-trans install lang

<<