Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Language files have been moved to keep them altogether under /lang

This should make it easier on translators.
  • Loading branch information...
commit 058eec18683c5e54c0ea7aa63828c37839f03131 1 parent fc5c407
authored August 02, 2002
9  lang/README
... ...
@@ -0,0 +1,9 @@
  1
+This directory contains language packages that define all 
  2
+the text to render Moodle in a particular language.
  3
+
  4
+Each directory is named according to the standard 2-letter 
  5
+language name, as defined in:
  6
+
  7
+   lib/languages.php
  8
+
  9
+
20  lang/en/README
... ...
@@ -0,0 +1,20 @@
  1
+README FOR LANGUAGE PLUGIN
  2
+--------------------------
  3
+
  4
+This directory contains all the strings and texts needed
  5
+to render a Moodle site in a particular language.
  6
+
  7
+The default language is English.  If a string is missing 
  8
+for any reason from another language, then the English 
  9
+version will be used.
  10
+
  11
+Note that each installed module should have a file here,
  12
+as well as the main file which is called "moodle.php".
  13
+
  14
+Whole pages written in HTML are stored in the "pages" directory.
  15
+
  16
+If you are thinking of translating Moodle to another language,
  17
+please contact me so I can help you!
  18
+
  19
+Cheers,
  20
+Martin
0  lang/en/assignment.php
No changes.
0  lang/en/choice.php
No changes.
33  lang/en/forum.php
... ...
@@ -0,0 +1,33 @@
  1
+<?
  2
+
  3
+$string[description] = "Description";
  4
+$string[discussion] = "Discussion";
  5
+$string[discussions] = "Discussions";
  6
+$string[forum] = "Forum";
  7
+$string[forums] = "Forums";
  8
+$string[generalforums] = "General forums";
  9
+$string[learningforums] = "Learning forums";
  10
+$string[message] = "Message";
  11
+$string[postingtip] = "<B>Posting tips:</B>
  12
+When replying:
  13
+<UL>
  14
+<LI>read their post carefully and empathically
  15
+<LI>look for things you can comment on
  16
+</UL>
  17
+
  18
+While writing:
  19
+<UL>
  20
+<LI>keep your posts short and on-topic
  21
+<LI>explain your own ideas clearly
  22
+<LI>think of questions you can ask
  23
+</UL>";
  24
+
  25
+$string[search] = "Search";
  26
+$string[subject] = "Subject";
  27
+$string[subscribe] = "Subscribe to this forum";
  28
+$string[subscribed] = "Subscribed";
  29
+$string[subscribers] = "Subscribers";
  30
+$string[subscribersto] = "Subscribers to '\$a'";
  31
+$string[unsubscribe] = "Unsubscribe from this forum";
  32
+
  33
+?>
0  lang/en/journal.php
No changes.
2  lang/en/strings.php → lang/en/moodle.php
@@ -142,6 +142,7 @@
142 142
 $string[newsitem] = "news item";
143 143
 $string[newsitems] = "news items";
144 144
 $string[newsitemsnumber] = "News items to show";
  145
+$string[no] = "No";
145 146
 $string[nosuchemail] = "No such email address";
146 147
 $string[notenrolled] = "\$a is not enrolled in this course.";
147 148
 $string[numberweeks] = "Number of weeks/topics";
@@ -203,5 +204,6 @@
203 204
 $string[wordforstudent] = "Your word for Student";
204 205
 $string[wordforstudenteg] = "eg Student, Participant etc";
205 206
 $string[wrongpassword] = "Incorrect password for this username";
  207
+$string[yes] = "Yes";
206 208
 
207 209
 ?>
5  lang/en/reading.php
... ...
@@ -0,0 +1,5 @@
  1
+<?
  2
+
  3
+$string[addreading] = "Add reading";
  4
+
  5
+?>
0  lang/en/survey.php
No changes.
17  lib/moodlelib.php
@@ -1204,18 +1204,17 @@ function get_string($identifier, $module="", $a=NULL) {
1204 1204
         $lang = $CFG->lang;
1205 1205
     }
1206 1206
 
1207  
-    if ($module == "" or $module == "moodle") {
1208  
-        $langpath = "$CFG->dirroot/lang";
1209  
-    } else {
1210  
-        $langpath = "$CFG->dirroot/mod/$module/lang";
  1207
+    if ($module == "") {
  1208
+        $module = "moodle";
1211 1209
     }
1212 1210
 
1213  
-    $langfile = "$langpath/$lang/strings.php";
  1211
+    $langpath = "$CFG->dirroot/lang";
  1212
+    $langfile = "$langpath/$lang/$module.php";
1214 1213
 
1215 1214
     if (!file_exists($langfile)) {                // try English instead
1216  
-        $langfile = "$langpath/en/strings.php";
  1215
+        $langfile = "$langpath/en/$module.php";
1217 1216
         if (!file_exists($langfile)) {
1218  
-            return "ERROR: No lang file";
  1217
+            return "ERROR: No lang file ($langpath/en/$module.php)!";
1219 1218
         }
1220 1219
     }
1221 1220
 
@@ -1229,9 +1228,9 @@ function get_string($identifier, $module="", $a=NULL) {
1229 1228
             return "ERROR: '$identifier' is missing!";
1230 1229
 
1231 1230
         } else {   // Try looking in the english file.
1232  
-            $langfile = "$langpath/en/strings.php";
  1231
+            $langfile = "$langpath/en/$module.php";
1233 1232
             if (!file_exists($langfile)) {
1234  
-                return "ERROR: No lang file";
  1233
+                return "ERROR: No lang file ($langpath/en/$module.php)!";
1235 1234
             }
1236 1235
             if ($result = get_string_from_file($identifier, $langfile, "\$resultstring")) {
1237 1236
                 eval($result);

0 notes on commit 058eec1

Please sign in to comment.
Something went wrong with that request. Please try again.