Yo Andy,
Do you mean the dropdown? The nonenglish mod is here: http://www.gossamer-threads.com/...rsion_2_x/index.html, the second one down. The code for the dropdown is like so:
From site_html_templates.pl:
sub site_html_add_form {
# --------------------------------------------------------
# This routine determines how the add form page will look like.
#
&html_print_headers;
my $category = shift;
# ***************************************** nonenglish modification - begin ****************
# $category ?
# ($category = qq~$category <input type=hidden name="Category" value="$category">~) :
# ($category = &build_select_field ("Category", "$in{'Category'}"));
my ($kategorie) = &kategorie_title_mb ($category);
$category ?
($category = qq~$kategorie <input type=hidden name="Category" value="$category">~) :
($category = &build_select_field ("Category", "$in{'Category'}"));
# ***************************************** nonenglish modification - end ******************
print &load_template ('add.html', {
Category => $category,
%globals
});
}
And from db_utils.pl
sub build_select_field {
# --------------------------------------------------------
# Builds a SELECT field based on information found
# in the database definition.
#
my ($column, $value, $name, $mult) = @_;
my ($size, %values);
$name || ($name = $column);
$size || ($size = 1);
if (! exists $db_select_fields{$column}) {
$db_select_fields{$db_cols[$db_category]} = $db_select_fields{'Mult-Related'} = join (",", &category_list);
}
if ($mult) {
@fields = split (/\,/, $db_select_fields{"Mult-$column"});
%values = map { $_ => 1 } split (/\Q$db_delim\E/, $value);
}
else {
@fields = split (/\,/, $db_select_fields{$column});
$values{$value}++;
}
($#fields >= 0) or return "error building select field: no select fields specified in config for field '$column'!";
$output = qq|<SELECT NAME="$name" $mult SIZE=$size><OPTION>---|;
## next changed LT for nonenglish mod **********
foreach $field (@fields) {
$kategory{$field} = &kategorie_title_mb1($field);
$values{$field} ?
($output .= "<OPTION SELECTED VALUE=\"$field\">$kategory{$field}\n") :
($output .= "<OPTION VALUE=\"$field\">$kategory{$field}");
}
## end LT nonenglish*****************
$output .= "</SELECT>";
return $output;
}
The dropdowns now show like so-- category : sub and category, but in the nonenglish they are entered as category : sub & category
Leonard
aka PerlFlunkie
Do you mean the dropdown? The nonenglish mod is here: http://www.gossamer-threads.com/...rsion_2_x/index.html, the second one down. The code for the dropdown is like so:
From site_html_templates.pl:
sub site_html_add_form {
# --------------------------------------------------------
# This routine determines how the add form page will look like.
#
&html_print_headers;
my $category = shift;
# ***************************************** nonenglish modification - begin ****************
# $category ?
# ($category = qq~$category <input type=hidden name="Category" value="$category">~) :
# ($category = &build_select_field ("Category", "$in{'Category'}"));
my ($kategorie) = &kategorie_title_mb ($category);
$category ?
($category = qq~$kategorie <input type=hidden name="Category" value="$category">~) :
($category = &build_select_field ("Category", "$in{'Category'}"));
# ***************************************** nonenglish modification - end ******************
print &load_template ('add.html', {
Category => $category,
%globals
});
}
And from db_utils.pl
sub build_select_field {
# --------------------------------------------------------
# Builds a SELECT field based on information found
# in the database definition.
#
my ($column, $value, $name, $mult) = @_;
my ($size, %values);
$name || ($name = $column);
$size || ($size = 1);
if (! exists $db_select_fields{$column}) {
$db_select_fields{$db_cols[$db_category]} = $db_select_fields{'Mult-Related'} = join (",", &category_list);
}
if ($mult) {
@fields = split (/\,/, $db_select_fields{"Mult-$column"});
%values = map { $_ => 1 } split (/\Q$db_delim\E/, $value);
}
else {
@fields = split (/\,/, $db_select_fields{$column});
$values{$value}++;
}
($#fields >= 0) or return "error building select field: no select fields specified in config for field '$column'!";
$output = qq|<SELECT NAME="$name" $mult SIZE=$size><OPTION>---|;
## next changed LT for nonenglish mod **********
foreach $field (@fields) {
$kategory{$field} = &kategorie_title_mb1($field);
$values{$field} ?
($output .= "<OPTION SELECTED VALUE=\"$field\">$kategory{$field}\n") :
($output .= "<OPTION VALUE=\"$field\">$kategory{$field}");
}
## end LT nonenglish*****************
$output .= "</SELECT>";
return $output;
}
The dropdowns now show like so-- category : sub and category, but in the nonenglish they are entered as category : sub & category
Leonard
aka PerlFlunkie