[Jifty-commit] r4280 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Oct 20 09:56:49 EDT 2007
Author: clkao
Date: Sat Oct 20 09:56:48 2007
New Revision: 4280
Modified:
jifty/trunk/lib/Jifty/I18N.pm
Log:
Provide get_current language method in Jifty::I18N.
Modified: jifty/trunk/lib/Jifty/I18N.pm
==============================================================================
--- jifty/trunk/lib/Jifty/I18N.pm (original)
+++ jifty/trunk/lib/Jifty/I18N.pm Sat Oct 20 09:56:48 2007
@@ -173,6 +173,13 @@
$$DynamicLH = $self->get_handle($lang ? $lang : ()) if $DynamicLH;
}
+sub get_current_language {
+ return unless $DynamicLH;
+
+ my ($lang) = ref($$DynamicLH) =~ m/::(\w+)$/;
+ return $lang;
+}
+
=head2 refresh
Used by L<Jifty::Handler> in DevelMode to reload F<.po> files whenever they
More information about the Jifty-commit
mailing list