Index: /trunk/gsdl/perllib/classify.pm
===================================================================
--- /trunk/gsdl/perllib/classify.pm	(revision 5681)
+++ /trunk/gsdl/perllib/classify.pm	(revision 5682)
@@ -29,4 +29,11 @@
 
 require util;
+use gsprintf;
+
+
+sub gsprintf
+{
+    return &gsprintf::gsprintf(@_);
+}
 
 
@@ -51,5 +58,7 @@
 	if (-e $colclassname) { require $colclassname; }
 	elsif (-e $mainclassname) { require $mainclassname; }
-	else { die "ERROR - couldn't find classifier \"$classname\"\n"; }
+	else { &gsprintf(STDERR, "{classify.could_not_find_classifier}\n", $classname) && die "\n";
+	       # die "ERROR - couldn't find classifier \"$classname\"\n";
+	   }
 
 	# create the classify object
Index: /trunk/gsdl/perllib/plugin.pm
===================================================================
--- /trunk/gsdl/perllib/plugin.pm	(revision 5681)
+++ /trunk/gsdl/perllib/plugin.pm	(revision 5682)
@@ -27,4 +27,5 @@
 
 require util;
+use gsprintf;
 
 my $stats = {'num_processed' => 0,
@@ -33,4 +34,11 @@
 	     'num_archives' => 0
 	     };
+
+
+sub gsprintf
+{
+    return &gsprintf::gsprintf(@_);
+}
+
 
 sub load_plugins {
@@ -54,5 +62,7 @@
 	if (-e $colplugname) { require $colplugname; }
 	elsif (-e $mainplugname) { require $mainplugname; }
-	else { die "ERROR - couldn't find plugin \"$pluginname\"\n"; }
+	else { &gsprintf(STDERR, "{plugin.could_not_find_plugin}\n", $pluginname) && die "\n";
+	       # die "ERROR - couldn't find plugin \"$pluginname\"\n";
+	   }
 
 	# create a plugin object
@@ -90,5 +100,6 @@
     # an import.pl or buildcol.pl process
     if (-e &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, ".kill")) {
-	print $outhandle "Process killed by .kill file\n";
+	&gsprintf($outhandle, "{plugin.kill_file}\n");
+	# print $outhandle "Process killed by .kill file\n";
 	die "\n";
     }
@@ -103,9 +114,11 @@
 
     if ($verbosity >= 2) {
-	print $outhandle "WARNING - no plugin could process $file\n";
+	&gsprintf($outhandle, "{plugin.no_plugin_could_process}\n", $file);
+	# print $outhandle "WARNING - no plugin could process $file\n";
     }
     
     $file =~ s/.*?([^\\\/]+)$/$1/;
-    print $failhandle "$file: no plugin could process this file\n";
+    &gsprintf($failhandle, "$file: {plugin.no_plugin_could_process_this_file}\n");
+    # print $failhandle "$file: no plugin could process this file\n";
     $stats->{'num_not_processed'} ++;
 
@@ -127,26 +140,39 @@
 
     if ($total == 1) {
-	print $statshandle "* 1 document was considered for processing\n";
+	&gsprintf($statshandle, "* {plugin.one_considered}\n");
+	# print $statshandle "* 1 document was considered for processing\n";
     } else {
-	print $statshandle "* $total documents were considered for processing\n";
+	&gsprintf($statshandle, "* {plugin.n_considered}\n", $total);
+	# print $statshandle "* $total documents were considered for processing\n";
     }
     if ($stats->{'num_archives'}) {
-	print $statshandle "   (including the contents of " . $stats->{'num_archives'} .
-	    " ZIP/TAR archive";
-	if ($stats->{'num_archives'} == 1) {print $statshandle ")\n";}
-	else {print $statshandle "s)\n";}
+	# print $statshandle "   (including the contents of " . $stats->{'num_archives'} .
+	#     " ZIP/TAR archive";
+	if ($stats->{'num_archives'} == 1) {
+	    &gsprintf($statshandle, "   ({plugin.including_archive})\n");
+	    # print $statshandle ")\n";}
+	}
+	else {
+	    &gsprintf($statshandle, "   ({plugin.including_archives})\n", $stats->{'num_archives'});
+	    # print $statshandle "s)\n";}
+	}
     }
     if ($stats->{'num_processed'} == 1) {
-	print $statshandle "* 1 was processed and included in the collection\n";
+	&gsprintf($statshandle, "* {plugin.one_included}\n");
+	# print $statshandle "* 1 was processed and included in the collection\n";
     } else {
-	print $statshandle "* " . $stats->{'num_processed'} . " were processed and included in the collection\n";
+	&gsprintf($statshandle, "* {plugin.n_included}\n", $stats->{'num_processed'});
+	# print $statshandle "* " . $stats->{'num_processed'} . " were processed and included in the collection\n";
     }
     if ($stats->{'num_not_processed'}) {
 	if ($stats->{'num_not_processed'} == 1) {
-	    print $statshandle "* 1 was rejected.";
+	    &gsprintf($statshandle, "* {plugin.one_rejected}\n");
+	    # print $statshandle "* 1 was rejected.";
 	} else {
-	    print $statshandle "* " . $stats->{'num_not_processed'} . " were rejected.";
-	} 
-	print $statshandle " See $faillog for a list of rejected documents\n";
+	    &gsprintf($statshandle, "* {plugin.n_rejected}\n", $stats->{'num_not_processed'});
+	    # print $statshandle "* " . $stats->{'num_not_processed'} . " were rejected.";
+	}
+	&gsprintf($statshandle, " {plugin.see_faillog}\n", $faillog);
+	# print $statshandle " See $faillog for a list of rejected documents\n";
     }
 }
Index: /trunk/gsdl/perllib/printusage.pm
===================================================================
--- /trunk/gsdl/perllib/printusage.pm	(revision 5681)
+++ /trunk/gsdl/perllib/printusage.pm	(revision 5682)
@@ -26,4 +26,7 @@
 
 package PrintUsage;
+
+
+use gsprintf;
 
 
@@ -53,5 +56,5 @@
     foreach $option (@$options) {
 	local $optionname = $option->{'name'};
-	local $optiondesc = &lookup_string($language, $option->{'desc'});
+	local $optiondesc = &gsprintf::lookup_string($language, $option->{'desc'});
 
 	# Escape '<' and '>' characters
@@ -78,5 +81,5 @@
 		print STDERR "          <Name>$optionvalue->{'name'}</Name>\n";
 		if (defined $optionvalue->{'desc'}) {
-		    local $optionvaluedesc = &lookup_string($language, $optionvalue->{'desc'});
+		    local $optionvaluedesc = &gsprintf::lookup_string($language, $optionvalue->{'desc'});
 
 		    # Escape '<' and '>' characters
@@ -156,8 +159,8 @@
 
 	# Display the option description
-	local $optiondesc = &lookup_string($language, $option->{'desc'});
+	local $optiondesc = &gsprintf::lookup_string($language, $option->{'desc'});
 	local $optionreqd = $option->{'reqd'};
 	if (defined($optionreqd) && $optionreqd eq "yes") {
-	    $optiondesc = "(REQUIRED) " . $optiondesc;
+	    $optiondesc = "(" . &gsprintf::lookup_string($language, "{PrintUsage.required}") . ") " . $optiondesc;
 	}
 	&display_text_in_column($optiondesc, $optiondescoffset, $optionstringlength, 80);
@@ -167,5 +170,6 @@
 	if (defined($optiondefault)) {
 	    print STDERR " " x $optiondescoffset;
-	    print STDERR "Default: " . $optiondefault . "\n";
+	    print STDERR &gsprintf::lookup_string($language, "{PrintUsage.default}");
+	    print STDERR ": " . $optiondefault . "\n";
 	}
 
@@ -179,5 +183,5 @@
 		print STDERR "$optionvaluename:";
 
-		local $optionvaluedesc = &lookup_string($language, $optionvalue->{'desc'});
+		local $optionvaluedesc = &gsprintf::lookup_string($language, $optionvalue->{'desc'});
 		&display_text_in_column($optionvaluedesc, $optiondescoffset + 2,
 					$optiondescoffset + length($optionvaluename), 80);
@@ -204,67 +208,4 @@
 
 
-sub lookup_string
-{
-    local ($language, $stringkey) = @_;
-
-    # Load the appropriate resource bundle
-    local %resourcebundle = &load_resource_bundle($language);
-
-    # Return the text matching the key (or just the key, if no match was found)
-    return $resourcebundle{$stringkey} || $stringkey;
-}
-
-
-my $cachedlanguage = "<none>";
-my %cachedresourcebundle = ();
-
-sub load_resource_bundle
-{
-    local $language = shift(@_);
-
-    # If the desired resource bundle is the one cached, return it
-    if ($language eq $cachedlanguage) {
-	return %cachedresourcebundle;
-    }
-
-    # Open the appropriate resource bundle
-    local $resourcebundlehome = &util::filename_cat("$ENV{'GSDLHOME'}", "perllib");
-    local $resourcebundlename = "strings_" . $language . ".rb";
-    local $resourcebundlefile = &util::filename_cat($resourcebundlehome, $resourcebundlename);
-
-    # If the specific resource bundle cannot be opened, use the generic (English) one
-    if (!open(RESOURCE_BUNDLE, "<$resourcebundlefile")) {
-	$resourcebundlename = "strings.rb";
-	$resourcebundlefile = &util::filename_cat($resourcebundlehome, $resourcebundlename);
-	open(RESOURCE_BUNDLE, "<$resourcebundlefile")
-	    or die "Error: Could not open generic resource bundle $resourcebundlefile.\n";
-    }
-
-    local @resourcebundlelines = <RESOURCE_BUNDLE>;
-    close(RESOURCE_BUNDLE);
-
-    # Load and cache this resource bundle
-    $cachedlanguage = $language;
-    %cachedresourcebundle = ();
-    foreach $line (@resourcebundlelines) {
-	# Remove any trailing whitespace
-	$line =~ s/(\s*)$//;
-
-	# Ignore comments and empty lines
-	if ($line !~ /^\#/ && $line ne "") {
-	    # Parse key (everything up to the first colon)
-	    $line =~ /^([^:]+):(.+)$/;
-	    local $linekey = "{" . $1 . "}";
-	    local $linetext = $2;
-
-	    # Map key to text
-	    $cachedresourcebundle{$linekey} = $linetext;
-	}
-    }
-
-    return %cachedresourcebundle;
-}
-
-
 sub display_text_in_column
 {
