Adding Language Tags (HTML) Takes a Long Time

Re: Adding Language Tags (HTML) Takes a Long Time

by Mary Evans -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
I'd say yes...well it can't be any harder than what you are doing already.

For each language $string (meaning one word, or a group of words) you can create your own custom language file for each language you need for your courses.

So you would need to compile these custom php files containing all the strings.
And all you would need to do in the page you are working on would be to instead of a span would be <?php get_string('a sentence','mylangfile.php'): ?> where the completed language file 'mylangfile.php' is stored in your Moodledata file in each the relevant lang folder, or in the relevant lang folder of your theme when you come to use Moodle.2.0.

Creating the individual files will be the big job, but the beauty of this is you are only having to write your original in English so the $string stays the same, all you need to change is it's equivalent in the language you need to have it displayed in but once created you can update them in a text editor like notepad and upload them to your Moodle site via Site Admin in Moodle 1.9x or upload them to your Theme folder in Moodle 2.0. as and when you need to.

It actually works in a similar way to how I got my theme to handle menu titles, se my It's all Greek to me! post in the forum.

Hope this helps.
Mary