Edit Lesson XML - First Steps

Submit to FacebookSubmit to Google PlusSubmit to Twitter

Note: The content on these pages that describes the process of creating an XML file will soon be obsolete or, depending on your perspective, perhaps it already is. We've developed a tool that we're calling Lesson Creator which auto-generates the XML file based on your script. This is currently under development but is mostly finished. We use it here at the Language Collaborative and wouldn't dream of writing lesson XML files by hand. If you'd like to be a beta tester for this tool, we invite you to contact us so that we can provide you with a copy.

Overview

This page shows how to begin editing a lesson XML file. The Create a Lesson Folder and XML File page shows how to create this file.

Here's what a new file looks like:



We've created this file by copying a generic template into it. Now we'll edit it, and add information about your lesson.


The lessonName Element



Put your lesson's name in the lessonName element. Keep it fairly short - 50 characters or less.


The isDualLanguage Element



Language Mentor lessons can be either "single language" or "dual language".

  • Single language lessons only include audio for the language that is being taught, the target language.
  • Dual language lessons include audio for both the target language and for the learner's native language. This allows the Language Mentor to tell the learner what they're hearing in the target language. They also make it possible for the learner to practice translating from their native language to the target language.
  • Single language lessons are quicker and easier to create, and can be used by speakers of any language.
  • Dual language lessons require more work to create, but are more helpful to the learner.
  • If your lesson is going to be a dual language lesson, put "true" in the isDualLanguage element, as shown above.
  • If your lesson is going to be a single language lesson, put "false" instead.


The nativeLanguageISO639_3Code Element



Next, let's look at the nativeLanguageISO639_3Code element.

If your lesson is a single language lesson you don't need this element. Simply delete this line of the XML file.

If your lesson is a dual language lesson you'll need to find the ISO 639-3 code for the lesson's native language, i.e. the native language of the learners the lesson is designed for.

The SIL website has a list and a search page which will help you to find the correct code.

Once you've found the correct code put it into the nativeLanguageISO639_3Code element. The example above shows the code for English - "eng".


The targetLanguageISO639_3Code Element



Next, we'll edit the targetLanguageISO639_3Code element.

Find the ISO 639-3 code for the lesson's target language, i.e. the language that the lesson teaches, and put it into the element. The example above has "cmn" in this element, which means that the lesson teaches Mandarin Chinese.

The SIL website has a list and a search page which will help you to find the correct code.


The level Element



Specify the level of the lesson by putting one of these values into the level element:

  • Introductory
  • Beginner
  • Intermediate
  • Advanced


The defaultTextDisplayType Element



The defaultTextDisplayType element tells Language Mentor what type of text to display for each chunk. It can contain either of these values:

  • textTargetLanguage
  • textTargetLanguagePhonetic

If you set this element to "textTargetLanguage", Language Mentor will will display standard text for each chunk in the target language as its audio is played. For example, a "Saying Hello" lesson might display “你好” ("hello").

But in some cases you may want to display phonetic text instead. For example, in Chinese it might be better to display "nǐ hǎo" instead of "你好". (This is "pinyin", a phonetic version of Chinese.) In these cases, set the defaultTextDisplayType element to "textTargetLanguagePhonetic".


Why "default"?

At this point you may be wondering what the "default" in "defaultTextDisplayType" refers to. Why isn't this element simply named "textDisplayType"?

The reason we're identifying a "default text type" rather than a "text type" is that we expect Language Mentor to evolve. At some point in the future authors will have the option to include both phonetic and non-phonetic text in lessons. In lessons where this is done users will be able to choose which type of text to display.

These options don't exist yet, but we're designing our XML format so that it will accomodate them when they  arrive. For now, simply understand that the defaultTextDisplayType element is also the lesson's "one and only text display type". 


Questions?

If you have questions about the lesson creation process, please contact us on our Creating Lessons forum. We're here to help.


What's Next?

Your next step will be to edit the chunks element. This is explained on the Edit Lesson XML - The chunks Element page.





.

If you'd like to stay in touch with developments at the Language Collaborative, sign up for our newsletter!

We'll send one email per month - max.