version 1.119, 2003/09/17 16:50:58
|
version 1.125, 2003/10/04 23:47:44
|
Line 80 my $readit;
|
Line 80 my $readit;
|
|
|
# ----------------------------------------------- Filetypes/Languages/Copyright |
# ----------------------------------------------- Filetypes/Languages/Copyright |
my %language; |
my %language; |
|
my %supported_language; |
my %cprtag; |
my %cprtag; |
my %fe; my %fd; |
my %fe; my %fd; |
my %category_extensions; |
my %category_extensions; |
Line 146 BEGIN {
|
Line 147 BEGIN {
|
while (<$fh>) { |
while (<$fh>) { |
next if /^\#/; |
next if /^\#/; |
chomp; |
chomp; |
my ($key,$two,$country,$three,$enc,$val)=(split(/\t/,$_)); |
my ($key,$two,$country,$three,$enc,$val,$sup)=(split(/\t/,$_)); |
$language{$key}=$val.' - '.$enc; |
$language{$key}=$val.' - '.$enc; |
|
if ($sup) { |
|
$supported_language{$key}=$sup; |
|
} |
} |
} |
} |
} |
} |
} |
Line 1505 returns description of a specified langu
|
Line 1509 returns description of a specified langu
|
=cut |
=cut |
|
|
sub languagedescription { |
sub languagedescription { |
return $language{shift(@_)}; |
my $code=shift; |
|
return ($supported_language{$code}?'* ':''). |
|
$language{$code}. |
|
($supported_language{$code}?' ['.&mt('interface available').']':''); |
} |
} |
|
|
=pod |
=pod |
Line 1661 sub preferred_languages {
|
Line 1668 sub preferred_languages {
|
push (@genlanguages,(split(/(\-|\_)/,$_))[0]); |
push (@genlanguages,(split(/(\-|\_)/,$_))[0]); |
} |
} |
} |
} |
&Apache::lonnet::logthis('Lang: '.join(',',@genlanguages)); |
|
return @genlanguages; |
return @genlanguages; |
} |
} |
|
|
Line 2322 sub no_cache {
|
Line 2328 sub no_cache {
|
#$r->header_out("Expires" => $date); |
#$r->header_out("Expires" => $date); |
} |
} |
|
|
|
sub content_type { |
|
my ($r,$type,$charset) = @_; |
|
unless ($charset) { |
|
$charset=&Apache::lonlocal::current_encoding; |
|
} |
|
$r->content_type($type.($charset?'; charset='.$charset:'')); |
|
} |
|
|
=pod |
=pod |
|
|
=item * add_to_env($name,$value) |
=item * add_to_env($name,$value) |