diff --git a/lib/WebGUI/Form/ContentType.pm b/lib/WebGUI/Form/ContentType.pm index e4621520c..016d161e2 100644 --- a/lib/WebGUI/Form/ContentType.pm +++ b/lib/WebGUI/Form/ContentType.pm @@ -93,15 +93,16 @@ Renders a select list form control. sub toHtml { my $self = shift; my %types; + my $i18n = WebGUI::International->new($self->session); foreach my $type (@{$self->get("types}")) { if ($type eq "text") { - $types{text} = WebGUI::International::get(1010); + $types{text} = $i18n->get(1010); } elsif ($type eq "mixed") { - $types{mixed} = WebGUI::International::get(1008); + $types{mixed} = $i18n->get(1008); } elsif ($type eq "code") { - $types{code} = WebGUI::International::get(1011); + $types{code} = $i18n->get(1011); } elsif ($type eq "html") { - $types{html} = WebGUI::International::get(1009); + $types{html} = $i18n->get(1009); } } $self->get("options") = \%types, diff --git a/lib/WebGUI/Form/File.pm b/lib/WebGUI/Form/File.pm index 5fdd10de9..a5725d60b 100644 --- a/lib/WebGUI/Form/File.pm +++ b/lib/WebGUI/Form/File.pm @@ -100,10 +100,11 @@ sub displayForm { my $location = WebGUI::Storage->get($self->session,$self->get("value")); my $id = $location->getId; my $fileForm = ''; + my $i18n = WebGUI::International->new($self->session); foreach my $file ( @{ $location->getFiles } ) { $fileForm .= sprintf qq!
!, $location->getUrl($file); my $action = join '_', '_', $self->get("name"), 'delete'; - $fileForm .= WebGUI::International::get(392) + $fileForm .= $i18n->get(392) . " "x4 . WebGUI::Form::YesNo->new({-name=>$action, -value=>0})->toHtml; } @@ -193,7 +194,8 @@ sub toHtml { $uploadControl .= 'fileIcons["'.$ext.'"] = "'.$self->session->config->get("extrasURL").'/fileIcons/'.$file.'";'."\n"; } } - $uploadControl .= 'var uploader = new FileUploadControl("'.$self->get("name").'", fileIcons, "'.WebGUI::International::get('removeLabel','WebGUI').'","'.$self->get("maxAttachments").'"); + my $i18n = WebGUI::International->new($self->session); + $uploadControl .= 'var uploader = new FileUploadControl("'.$self->get("name").'", fileIcons, "'.$i18n->get('removeLabel','WebGUI').'","'.$self->get("maxAttachments").'"); uploader.addRow(); '; return $uploadControl; diff --git a/lib/WebGUI/Form/Submit.pm b/lib/WebGUI/Form/Submit.pm index 08b7c4dc6..c25104fc6 100644 --- a/lib/WebGUI/Form/Submit.pm +++ b/lib/WebGUI/Form/Submit.pm @@ -68,7 +68,8 @@ Renders a button. sub toHtml { my $self = shift; my $value = $self->fixQuotes($self->get("value")); - $self->get("extras") ||= 'onclick="this.value=\''.WebGUI::International::get(452).'\'"'; + my $i18n = WebGUI::International->new($self->session); + $self->get("extras") ||= 'onclick="this.value=\''.$i18n->get(452).'\'"'; my $html = 'get("name").'" ' if ($self->get("name")); $html .= 'id="'.$self->{id}.'" ' unless ($self->{id} eq "_formId"); diff --git a/lib/WebGUI/Form/YesNo.pm b/lib/WebGUI/Form/YesNo.pm index 30c9ac1c9..d55bcdf58 100644 --- a/lib/WebGUI/Form/YesNo.pm +++ b/lib/WebGUI/Form/YesNo.pm @@ -102,6 +102,7 @@ Renders a yes/no question field. sub toHtml { my $self = shift; + my $i18n = WebGUI::International->new($self->session); my ($checkYes, $checkNo); if ($self->get("value")) { $checkYes = 1; @@ -114,7 +115,7 @@ sub toHtml { value=>1, extras=>$self->get("extras") )->toHtml; - $output .= WebGUI::International::get(138); + $output .= $i18n->get(138); $output .= '   '; $output .= WebGUI::Form::Radio->new( checked=>$checkNo, @@ -122,7 +123,7 @@ sub toHtml { value=>0, extras=>$self->get("extras") )->toHtml; - $output .= WebGUI::International::get(139); + $output .= $i18n->get(139); return $output; }