[LON-CAPA-cvs] cvs: loncom /localize lonlocal.pm

www lon-capa-cvs@mail.lon-capa.org
Sat, 20 Sep 2003 17:04:02 -0000


www		Sat Sep 20 13:04:02 2003 EDT

  Modified files:              
    /loncom/localize	lonlocal.pm 
  Log:
  Saving my work.
  
  
Index: loncom/localize/lonlocal.pm
diff -u loncom/localize/lonlocal.pm:1.7 loncom/localize/lonlocal.pm:1.8
--- loncom/localize/lonlocal.pm:1.7	Sat Sep 20 10:16:09 2003
+++ loncom/localize/lonlocal.pm	Sat Sep 20 13:04:02 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Localization routines
 #
-# $Id: lonlocal.pm,v 1.7 2003/09/20 14:16:09 www Exp $
+# $Id: lonlocal.pm,v 1.8 2003/09/20 17:04:02 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -73,6 +73,13 @@
     return $lh->language_tag();
 }
 
+# ============================================================== What encoding?
+
+sub current_encoding {
+    my $enc=$lh->maketext('char_encoding');
+    return ($enc eq 'char_encoding'?'':$enc);
+}
+
 # ============================================================== Translate hash
 
 sub texthash {
@@ -109,6 +116,11 @@
 
 sub get_language_handle {
     $lh=Apache::localize->get_handle(&Apache::loncommon::preferred_languages);
+    $r->content_languages(["&current_language()"]);
+    my $enc=&current_encoding();
+    if ($enc) {
+
+    }
 }
 
 1;