[Koha-devel] Localization of Perl strings in Koha

Julian Maurice julian.maurice at biblibre.com
Fri May 11 12:17:14 CEST 2012


Hi,

a discussion has started in bug 8044 
(http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8044) about 
localization in Koha. But I want to include in this discussion the 
maximum number of people.

Summary of the discussion:
     I proposed a patch that uses Locale::Maketext.
     You can see an example of use in the 2nd patch attached to the bug, 
but here is a code sample:

       use Koha::I18N;
       use CGI;
       my $cgi = new CGI;
       my $lh = Koha::I18N->get_handle_from_context($cgi, 'intranet');
       $lh->maketext("A localized string with parameter: [_1]", 
$some_scalar);

     Then, Frédéric Démians suggested to use Locale::TextDomain instead 
of Locale::Maketext (some advantages are listed in bug comments)

     There is also a discussion about how we can handle templates 
translation with a translation framework like Locale::Maketext or 
Locale::TextDomain. This is not the topic of bug 8044, but a global 
discussion now is certainly better than choosing a direction now and 
then taking the opposite direction in a few months.


First, we have to make a decision about the module to use. If you know 
well the two modules, please join the discussion!

Next, the patch is only a 'first draft': PO files are in a new directory 
locale/<LANG>, and the script that updates PO files is in locale 
directory too. I don't know where is the best place to put them in order 
to integrate well with Koha. So any suggestions are welcomed.

If you have any other suggestion, please feel free to contribute :)

-- 
Julian Maurice <julian.maurice at biblibre.com>
BibLibre


More information about the Koha-devel mailing list