'Courses' to 'Projects'

Re: 'Courses' to 'Projects'

by Jonathan Newman -
Number of replies: 0
As a workaround until the abilty to replace all instances of "student" "teacher" and "course" in language pack strings is integrated into Moodle administration, you can use a perl script found in the cvs repostitory's "contrib/devtools" directory to replace these strings in a custom language pack:

http://moodle.cvs.sourceforge.net/moodle/contrib/devtools/customlang.pl?revision=1.3&view=markup

Thanks to Martin Langhoff and Jun Yamog for their earlier contributions to the script.

A lot of things are still hard-coded and could use more polishing. You'll want to review the code and make a number of changes based on your particular needs.

Here are some specifics on what it does:

1. Rewrites language string variations of "student," "teacher" and
"course" to "writer" "manager" and "module" respectively. *

2. Creates a new custom language directory if it doesn't already exists based on a variable named "$customlangdir" which defines the original language directory. **

3. References a variable "$originlangdir" which defines the new
origin language directory. ***

4. Deletes the contents of the old custom language directory if the directory already exists (before it rewrites it). ****

5. Outputs original and custom string for testing and review. ****

6. Omits the following directories:
help/
docs/
README/
fonts/

* For example, "student", "students", "Student", "Students" get changed to "writer", "writers", "Writer", and "Writers" -- these can be edited in the script to your needs). The occurance of "student" "teacher" and "course" in string variable name remains unchanged.

** The $customlangdir variable name is currently set to "lang_xx_en" and any two characters can be used "aa" "ab" etc -- as this is the Moodle convention and the database enforces this (via the varchar length of the mdl_user.lang field in the database--at least in Moodle 1.6).

*** The $originlangdir variable name is currently set to "lang_en" (ie, the english language pack).

**** This is to allow you to make multiple iterations on developing and testing the custom language pack -- as I needed to.

Happy new, custom language pack creating!

Jonathan