Forum Discussion
Capture and report Language selection in LMS
The SCORM Reference Models contain elements dedicated to this. In SCORM 1.2, the element is cmi.student_preference.language. In SCORM 2004, it is cmi.learner_preference.language.
In both instances, the element is used by a SCO with multi-lingual capability to both set and obtain from the LMS language preferences for the student.
Storyline contains a paired set of JavaScript functions which read and write to these elements, GetLanguagePreference and SetLanguagePreference.
Using JavaScript, you would retrieve the learner's language preference like this:
var lmsAPI = window.parent;
var player = GetPlayer();
var lmsLanguagePreference = lmsAPI.GetLanguagePreference();
player.SetVar("lmsLanguagePreference", lmsLanguagePreference);
You will need to have a variable in Storyline declared so that you can display and manipulate the value; I used lmsLanguagePreference in this instance. I've previously used a drop-down interaction type to allow the user to select the language; however you do it is up to you.
To return the learner's language preference to the LMS, you would do something like this:
var lmsAPI = window.parent;
var player = GetPlayer();
lmsAPI.SetLanguagePreference(player.GetVar("lmsLanguagePreference"));
The single-biggest issue I have run into is cmi.student_preference.language / cmi.learner_preference.language are not mandatory elements in Learning Management Systems, and some LMS manufacturers do not support them. While SCORM Cloud will obviously accept, retain, and return the value when queried, not all LMS' will. You will need to check with your LMS admin and provider to see if your particular LMS supports cmi.student_preference.language / cmi.learner_preference.language.
HTH