summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-19 22:00:22 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-19 22:00:22 +0000
commitad639c021cb29832f2e34a9b956b570490656795 (patch)
treefebea58bcb05d503ef26cf614e3eb81c05a16b7b /LedgerSMB
parent800215d334fc0239f48b5e1a552ce015c4eab601 (diff)
Documentation update for $locale->date
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1217 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r--LedgerSMB/Locale.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/LedgerSMB/Locale.pm b/LedgerSMB/Locale.pm
index e9fe32c6..bfa4e461 100644
--- a/LedgerSMB/Locale.pm
+++ b/LedgerSMB/Locale.pm
@@ -1,3 +1,4 @@
+
=head1 NAME
LedgerSMB::Locale Locale handling class for LedgerSMB
@@ -9,17 +10,24 @@ Locale support module for LedgerSMB. Uses Locale::Maketext::Lexicon as a base.
=head1 METHODS
=item get_handle ($language_code)
+
Returns a locale handle for accessing the other methods. Inherited from
Locale::Maketext.
=item text ($string)
+
Returns the translation for the given string. This is a legacy wrapper that
merely calls $self->maketext.
=item date ($myconfig, $date, $longformat)
-Returns the given date after formatting it. If $longformat is set, the date
-will be givin in the form of "_('September') 23 2007". If $longformat is not
-set, the date will be output in the format specified by $myconfig->{dateformat}.
+
+Returns the given date after formatting it. $longformat is a ternary flag that
+determines how the date is formatted. If $longformat is true, the date will be
+given in the form of "_('September') 23 2007". If $longformat is false but
+defined, the date will be in the form of "_('Sep') 23 2007" unless the date is
+given in the form 'yyyy.mm.dd', in which case it is returned as-is. If
+$longformat is not defined, the date will be output in the format specified by
+$myconfig->{dateformat}.
=head1 Copyright (C) 2006, The LedgerSMB core team.
@@ -60,6 +68,7 @@ set, the date will be output in the format specified by $myconfig->{dateformat}.
=cut
package LedgerSMB::Locale;
+
use base 'Locale::Maketext';
use Locale::Maketext::Lexicon;
use Encode;