[LON-CAPA-cvs] cvs: loncom /localize localize.pm lonlocal.pm doc/loncapafiles loncapafiles.lpml
www
lon-capa-cvs@mail.lon-capa.org
Tue, 16 Sep 2003 15:23:43 -0000
www Tue Sep 16 11:23:43 2003 EDT
Added files:
/loncom/localize localize.pm lonlocal.pm
Modified files:
/doc/loncapafiles loncapafiles.lpml
Log:
Start of localization work with Locale::Maketext under the hood.
Usage (eventually):
use Apache::lonlocal;
...
$r->print( ... &mt('Stuff') ... );
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.281 doc/loncapafiles/loncapafiles.lpml:1.282
--- doc/loncapafiles/loncapafiles.lpml:1.281 Thu Sep 11 18:03:53 2003
+++ doc/loncapafiles/loncapafiles.lpml Tue Sep 16 11:23:43 2003
@@ -2,7 +2,7 @@
"http://lpml.sourceforge.net/DTD/lpml.dtd">
<!-- loncapafiles.lpml -->
-<!-- $Id: loncapafiles.lpml,v 1.281 2003/09/11 22:03:53 albertel Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.282 2003/09/16 15:23:43 www Exp $ -->
<!--
@@ -2475,6 +2475,22 @@
<categoryname>handler</categoryname>
<description>
Contains a set of functions that generate html controls and data layouts
+</description>
+</file>
+<file>
+<source>loncom/localize/lonlocal.pm</source>
+<target dist='default'>home/httpd/lib/perl/Apache/lonlocal.pm</target>
+<categoryname>handler</categoryname>
+<description>
+Contains the &mt access function to Locale::Maketext
+</description>
+</file>
+<file>
+<source>loncom/localize/localize.pm</source>
+<target dist='default'>home/httpd/lib/perl/Apache/localize.pm</target>
+<categoryname>handler</categoryname>
+<description>
+Localization class for Locale::Maketext
</description>
</file>
<file>
Index: loncom/localize/localize.pm
+++ loncom/localize/localize.pm
# The LearningOnline Network with CAPA
# Localization class
#
# $Id: localize.pm,v 1.1 2003/09/16 15:23:43 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# /home/httpd/html/adm/gpl.txt
#
# http://www.lon-capa.org/
#
######################################################################
######################################################################
package Apache::localize;
use base qw(Locale::Maketext);
package Apache::localize::en_us;
use base qw(Apache::localize);
%Lexicon=('_AUTO' => 1 );
1;
__END__
Index: loncom/localize/lonlocal.pm
+++ loncom/localize/lonlocal.pm
# The LearningOnline Network with CAPA
# Localization routines
#
# $Id: lonlocal.pm,v 1.1 2003/09/16 15:23:43 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# /home/httpd/html/adm/gpl.txt
#
# http://www.lon-capa.org/
#
######################################################################
######################################################################
package Apache::lonlocal;
use strict;
use Apache::localize;
require Exporter;
our @ISA = qw (Exporter);
our @EXPORT = qw(mt);
# ========================================================= The language handle
use vars qw($lh);
# ===================================================== The "MakeText" function
sub mt (@) {
return $lh->maketext(@_);
}
# ========= Get a handle (do not invoke in vain, leave this to access handlers)
sub get_language_handle {
$lh=Apache::localize->get_handle();
}
1;
__END__