[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1216] trunk/LedgerSMB/Locale.pm
- Subject: SF.net SVN: ledger-smb: [1216] trunk/LedgerSMB/Locale.pm
- From: ..hidden..
- Date: Sat, 19 May 2007 15:00:02 -0700
Revision: 1216
http://svn.sourceforge.net/ledger-smb/?rev=1216&view=rev
Author: tetragon
Date: 2007-05-19 15:00:01 -0700 (Sat, 19 May 2007)
Log Message:
-----------
Documentation update for $locale->date
Modified Paths:
--------------
trunk/LedgerSMB/Locale.pm
Modified: trunk/LedgerSMB/Locale.pm
===================================================================
--- trunk/LedgerSMB/Locale.pm 2007-05-19 14:33:19 UTC (rev 1215)
+++ trunk/LedgerSMB/Locale.pm 2007-05-19 22:00:01 UTC (rev 1216)
@@ -12,18 +12,25 @@
=over
=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}.
+
=back
=head1 Copyright (C) 2006, The LedgerSMB core team.
@@ -66,6 +73,7 @@
=cut
package LedgerSMB::Locale;
+
use base 'Locale::Maketext';
use Locale::Maketext::Lexicon;
use Encode;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.