]> git.koha-community.org Git - koha.git/commit
Bug 8044: new module for translating strings in Perl source files
authorJulian Maurice <julian.maurice@biblibre.com>
Fri, 4 May 2012 12:33:10 +0000 (14:33 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 1 Aug 2014 13:50:07 +0000 (15:50 +0200)
commitf05d933bf9deb0a999dba5550a22debeca068d30
treefab19c8a88c6810da5b08aba78fb9615353cd424
parentd0ea1ce586de9cd65edc92d32ae9c25e112b13fa
Bug 8044: new module for translating strings in Perl source files

You have to use the new module Koha::I18N

Code example:
  use Koha::I18N;
  use CGI;

  my $input = new CGI;
  my $lh = Koha::I18N->get_handle_from_context($input, 'intranet');

  print $lh->maketext("Localized string!");

PO files are in misc/translator/po/LANG-messages.po.
Creation of PO files are integrated to existing workflow, so to create
PO file for a language, just run in misc/translator:
  ./translate create LANG
To update:
  ./translate update LANG
You can then translate the PO with your favorite editor. Strings will be
localized at runtime.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. Some details needing further attention noted on bug
report.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 114f3dd49998be21643f83bec644f9837c6bdecc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/I18N.pm [new file with mode: 0644]
misc/translator/LangInstaller.pm