From 6a91692518f8695dac9a3cdc6d88fbf8d4359f9c Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Tue, 15 Jan 2008 01:40:02 +0000 Subject: [PATCH] Merged from MOODLE_19_STABLE: MDL-13001 - adding support for language files in local/ directory. --- lib/locallib.php | 10 ++++++++++ lib/moodlelib.php | 1 + 2 files changed, 11 insertions(+) diff --git a/lib/locallib.php b/lib/locallib.php index a4b89a83c8..a1db1ed24e 100644 --- a/lib/locallib.php +++ b/lib/locallib.php @@ -48,6 +48,16 @@ * with $oldversion set to 0, so that all the updates run. * * + * Local language support + * ---------------------- + * + * Moodle supports looking in the local/ directory for language files. + * You would need to create local/lang/en_utf8/local.php + * and then could call strings like get_string('key', 'local'); + * Make sure you don't call the language file something that moodle already has one of, + * stick to local or $clientname) + * + * * Local admin menu items * ---------------------- * diff --git a/lib/moodlelib.php b/lib/moodlelib.php index c0ed3c321b..0165e36464 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -5005,6 +5005,7 @@ function get_string($identifier, $module='', $a=NULL, $extralocations=NULL) { } else { $locations[] = $CFG->dataroot.'/lang/'; $locations[] = $CFG->dirroot.'/lang/'; + $locations[] = $CFG->dirroot.'/local/lang/'; } /// Add extra places to look for strings for particular plugin types. -- 2.39.5