You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
1.0 KiB

#!/usr/bin/perl
#
# $Id: langtest.pl,v 1.3 2005/11/30 21:01:56 ddoughty Exp $
#
# genutil.pl : Generic, application-independent utilities
#
# Don't put stuff in here if it has any dependencies on the application.
#
require 'sitecfg.pl';
require 'smilib.pl';
require 'languagelib.pl';
sub lang_test {
print "Content-Type: text/html\n\n";
&app_initialize;
print "<pre>";
&LanguageSupportInit();
my $dir = join($pathsep, $secroot, "language");
my @langs = qw(enu arb deu fr sp cyr my kor afr hin);
my %phrases;
my $phrase_count = `wc -l $dir/phrases.enu`;
my %loaded;
my $i = 0;
for (my $i = 0; $i < $phrase_count; $i++) {
foreach my $lang ( @langs ) {
if ( ! $loaded{$lang}++ ) {
&logger::logdbg("Loading $lang language ...");
&LoadLanguage($lang);
}
my $phrase = GetLanguageElement($lang,$i) || 'undef';
$phrase ||= 'undef';
print ("GetLanguageElement($lang, $i) = $phrase\n");
}
print "------------------------------------------------\n";
}
print "</pre>";
return 1;
}
&lang_test();
1;