[Jifty-commit] r6753 - jifty/trunk/lib/Jifty/Plugin/I18N/Action

Jifty commits jifty-commit at lists.jifty.org
Thu Apr 9 18:39:03 EDT 2009


Author: alexmv
Date: Thu Apr  9 18:39:02 2009
New Revision: 6753

Modified:
   jifty/trunk/lib/Jifty/Plugin/I18N/Action/SetLang.pm

Log:
Document Jifty::Plugin::I18N::Action::SetLang

Modified: jifty/trunk/lib/Jifty/Plugin/I18N/Action/SetLang.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/I18N/Action/SetLang.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/I18N/Action/SetLang.pm	Thu Apr  9 18:39:02 2009
@@ -5,6 +5,18 @@
 use base 'Class::Data::Inheritable';
 __PACKAGE__->mk_classdata(_available_languages => undef);
 
+=head1 NAME
+
+Jifty::Plugin::I18N::Action::SetLang - Sets user's current language
+
+=head1 PARAMETERS
+
+=head1 lang
+
+The language to change to
+
+=cut
+
 use Jifty::Param::Schema;
 use Jifty::Action schema {
 
@@ -14,6 +26,15 @@
     default is defer { Jifty::I18N->get_current_language };
 };
 
+=head1 METHODS
+
+=head2 available_languages
+
+Returns the list of possible internationalizations, as an array
+reference suitable to pass to C<valid_values>.
+
+=cut
+
 sub available_languages {
     my $class = shift;
     return $class->_available_languages if $class->_available_languages;
@@ -24,6 +45,12 @@
     return $class->_available_languages;
 }
 
+=head2 arguments
+
+Sets the valid values for C<lang> to L</available_languages>.
+
+=cut
+
 sub arguments {
     my $self = shift;
     my $args = $self->SUPER::arguments;
@@ -34,6 +61,12 @@
     return $args;
 }
 
+=head2 take_action
+
+Alters the current session to use the given language.
+
+=cut
+
 sub take_action {
     my $self = shift;
     my $lang = $self->argument_value('lang');


More information about the Jifty-commit mailing list