Permalink
Browse files

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

This should make it easier on translators.
  • Loading branch information...
1 parent fc5c407 commit 058eec18683c5e54c0ea7aa63828c37839f03131 martin committed Aug 2, 2002
View
@@ -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
+
+
View
@@ -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
No changes.
View
No changes.
View
@@ -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";
+
+?>
View
No changes.
@@ -142,6 +142,7 @@
$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[wordforstudent] = "Your word for Student";
$string[wordforstudenteg] = "eg Student, Participant etc";
$string[wrongpassword] = "Incorrect password for this username";
+$string[yes] = "Yes";
?>
View
@@ -0,0 +1,5 @@
+<?
+
+$string[addreading] = "Add reading";
+
+?>
View
No changes.
View
@@ -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);

0 comments on commit 058eec1

Please sign in to comment.