From: mjollnir_ Date: Tue, 15 Jan 2008 01:40:02 +0000 (+0000) Subject: Merged from MOODLE_19_STABLE: MDL-13001 - adding support for language files in local... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6a91692518f8695dac9a3cdc6d88fbf8d4359f9c;p=moodle.git Merged from MOODLE_19_STABLE: MDL-13001 - adding support for language files in local/ directory. --- 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.