]> git.mjollnir.org Git - moodle.git/commitdiff
Language files have been moved to keep them altogether under /lang
authormartin <martin>
Fri, 2 Aug 2002 09:24:50 +0000 (09:24 +0000)
committermartin <martin>
Fri, 2 Aug 2002 09:24:50 +0000 (09:24 +0000)
This should make it easier on translators.

lang/README [new file with mode: 0644]
lang/en/README [new file with mode: 0644]
lang/en/assignment.php [new file with mode: 0644]
lang/en/choice.php [new file with mode: 0644]
lang/en/forum.php [new file with mode: 0644]
lang/en/journal.php [new file with mode: 0644]
lang/en/moodle.php [moved from lang/en/strings.php with 99% similarity]
lang/en/reading.php [new file with mode: 0644]
lang/en/survey.php [new file with mode: 0644]
lib/moodlelib.php

diff --git a/lang/README b/lang/README
new file mode 100644 (file)
index 0000000..e45e587
--- /dev/null
@@ -0,0 +1,9 @@
+This directory contains language packages that define all 
+the text to render Moodle in a particular language.
+
+Each directory is named according to the standard 2-letter 
+language name, as defined in:
+
+   lib/languages.php
+
+
diff --git a/lang/en/README b/lang/en/README
new file mode 100644 (file)
index 0000000..43393e5
--- /dev/null
@@ -0,0 +1,20 @@
+README FOR LANGUAGE PLUGIN
+--------------------------
+
+This directory contains all the strings and texts needed
+to render a Moodle site in a particular language.
+
+The default language is English.  If a string is missing 
+for any reason from another language, then the English 
+version will be used.
+
+Note that each installed module should have a file here,
+as well as the main file which is called "moodle.php".
+
+Whole pages written in HTML are stored in the "pages" directory.
+
+If you are thinking of translating Moodle to another language,
+please contact me so I can help you!
+
+Cheers,
+Martin
diff --git a/lang/en/assignment.php b/lang/en/assignment.php
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lang/en/choice.php b/lang/en/choice.php
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lang/en/forum.php b/lang/en/forum.php
new file mode 100644 (file)
index 0000000..f60d73b
--- /dev/null
@@ -0,0 +1,33 @@
+<?
+
+$string[description] = "Description";
+$string[discussion] = "Discussion";
+$string[discussions] = "Discussions";
+$string[forum] = "Forum";
+$string[forums] = "Forums";
+$string[generalforums] = "General forums";
+$string[learningforums] = "Learning forums";
+$string[message] = "Message";
+$string[postingtip] = "<B>Posting tips:</B>
+When replying:
+<UL>
+<LI>read their post carefully and empathically
+<LI>look for things you can comment on
+</UL>
+
+While writing:
+<UL>
+<LI>keep your posts short and on-topic
+<LI>explain your own ideas clearly
+<LI>think of questions you can ask
+</UL>";
+
+$string[search] = "Search";
+$string[subject] = "Subject";
+$string[subscribe] = "Subscribe to this forum";
+$string[subscribed] = "Subscribed";
+$string[subscribers] = "Subscribers";
+$string[subscribersto] = "Subscribers to '\$a'";
+$string[unsubscribe] = "Unsubscribe from this forum";
+
+?>
diff --git a/lang/en/journal.php b/lang/en/journal.php
new file mode 100644 (file)
index 0000000..e69de29
similarity index 99%
rename from lang/en/strings.php
rename to lang/en/moodle.php
index 3d5c8c13c707854363b6431eed36e05758bff075..a879a4686c1adf09e8f88a00a061202655bf3b98 100644 (file)
@@ -142,6 +142,7 @@ $string[newpicture] = "New picture";
 $string[newsitem] = "news item";
 $string[newsitems] = "news items";
 $string[newsitemsnumber] = "News items to show";
+$string[no] = "No";
 $string[nosuchemail] = "No such email address";
 $string[notenrolled] = "\$a is not enrolled in this course.";
 $string[numberweeks] = "Number of weeks/topics";
@@ -203,5 +204,6 @@ $string[wordforteachereg] = "eg Teacher, Tutor, Facilitator etc";
 $string[wordforstudent] = "Your word for Student";
 $string[wordforstudenteg] = "eg Student, Participant etc";
 $string[wrongpassword] = "Incorrect password for this username";
+$string[yes] = "Yes";
 
 ?>
diff --git a/lang/en/reading.php b/lang/en/reading.php
new file mode 100644 (file)
index 0000000..f0d9642
--- /dev/null
@@ -0,0 +1,5 @@
+<?
+
+$string[addreading] = "Add reading";
+
+?>
diff --git a/lang/en/survey.php b/lang/en/survey.php
new file mode 100644 (file)
index 0000000..e69de29
index b682a3423126539e60cd2de1b963d846e13acc82..ae1b1978bac447c68f67da0a5d55efefa2d3a138 100644 (file)
@@ -1204,18 +1204,17 @@ function get_string($identifier, $module="", $a=NULL) {
         $lang = $CFG->lang;
     }
 
-    if ($module == "" or $module == "moodle") {
-        $langpath = "$CFG->dirroot/lang";
-    } else {
-        $langpath = "$CFG->dirroot/mod/$module/lang";
+    if ($module == "") {
+        $module = "moodle";
     }
 
-    $langfile = "$langpath/$lang/strings.php";
+    $langpath = "$CFG->dirroot/lang";
+    $langfile = "$langpath/$lang/$module.php";
 
     if (!file_exists($langfile)) {                // try English instead
-        $langfile = "$langpath/en/strings.php";
+        $langfile = "$langpath/en/$module.php";
         if (!file_exists($langfile)) {
-            return "ERROR: No lang file";
+            return "ERROR: No lang file ($langpath/en/$module.php)!";
         }
     }
 
@@ -1229,9 +1228,9 @@ function get_string($identifier, $module="", $a=NULL) {
             return "ERROR: '$identifier' is missing!";
 
         } else {   // Try looking in the english file.
-            $langfile = "$langpath/en/strings.php";
+            $langfile = "$langpath/en/$module.php";
             if (!file_exists($langfile)) {
-                return "ERROR: No lang file";
+                return "ERROR: No lang file ($langpath/en/$module.php)!";
             }
             if ($result = get_string_from_file($identifier, $langfile, "\$resultstring")) {
                 eval($result);