Here's a link to a previous thread on this topic:
https://moodle.org/mod/forum/search.php?id=5&search=cmi.student_preference.language
In the Javascript of a Scorm package, when I put:
Mlanguage = doLMSGetValue("cmi.student_preference.language");
When I ask Javascript to alert what is the variable Mlanguage?
It is "defined" but an "empty string".
According to the Scorm 1.2 specification, cmi.student_preference.language is a RW variable with 255 bytes. Is it decided by the Scorm or by the LMS?
********
Here is the javascript code that I used to test Mlanguage (or "cmi.student_preference.language")
if (typeof Mlanguage !== "undefined") {
alert("defined");
if (Mlanguage === "") {
alert("empty string");
}
if (Mlanguage === null) {
alert("null");
}
}
else {
alert("not defined");
}
I received messages of "defined", "empty string".
********
This language issue may seem minor but I work in Canada where we have, uh, two languages. I reckon that my Scorm packages should know whether a user has chosen French or English as a preferred Moodle language.