From: martin Date: Fri, 2 Aug 2002 09:24:50 +0000 (+0000) Subject: Language files have been moved to keep them altogether under /lang X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=058eec18683c5e54c0ea7aa63828c37839f03131;p=moodle.git Language files have been moved to keep them altogether under /lang This should make it easier on translators. --- diff --git a/lang/README b/lang/README new file mode 100644 index 0000000000..e45e587f99 --- /dev/null +++ b/lang/README @@ -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 index 0000000000..43393e5734 --- /dev/null +++ b/lang/en/README @@ -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 index 0000000000..e69de29bb2 diff --git a/lang/en/choice.php b/lang/en/choice.php new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lang/en/forum.php b/lang/en/forum.php new file mode 100644 index 0000000000..f60d73b563 --- /dev/null +++ b/lang/en/forum.php @@ -0,0 +1,33 @@ +Posting tips: +When replying: + + +While writing: +"; + +$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 index 0000000000..e69de29bb2 diff --git a/lang/en/strings.php b/lang/en/moodle.php similarity index 99% rename from lang/en/strings.php rename to lang/en/moodle.php index 3d5c8c13c7..a879a4686c 100644 --- a/lang/en/strings.php +++ b/lang/en/moodle.php @@ -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 index 0000000000..f0d9642e09 --- /dev/null +++ b/lang/en/reading.php @@ -0,0 +1,5 @@ + diff --git a/lang/en/survey.php b/lang/en/survey.php new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/moodlelib.php b/lib/moodlelib.php index b682a34231..ae1b1978ba 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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);