[Koha-bugs] [Bug 8044] Localization for Perl scripts and modules
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Apr 26 15:48:49 CEST 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8044
Kyle M Hall <kyle at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #13218|0 |1
is obsolete| |
Attachment #13219|0 |1
is obsolete| |
Attachment #13220|0 |1
is obsolete| |
Attachment #13221|0 |1
is obsolete| |
--- Comment #40 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 17711
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17711&action=edit
Bug 8044: First draft for Koha localization using Locale::Maketext
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 at rijksmuseum.nl>
Works as advertised. Some details needing further attention noted on bug
report.
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list