Forum Discussion
Change HTML source language in Rise course
Dear community,
We developed an e-learning in Dutch using Articulate Rise and have gotten it tested on accessibility. One of the comments on the course was that in the HTML of the course the source language is shown as English ("html lang=en"), even though the full course is in Dutch. This results in screen readers selecting the language as English instead of Dutch which causes issues in, for example, wrong pronunciation of words. To overcome this users will have to manually select a different language on their screen readers.
I am wondering whether there is some kind of way to fix this and change the source language? Anyone experience with this?
Many thanks for your help!
28 Replies
- HanneJacobsen-7Community Member
We create courses for the public sector and have faced the same issue with the language in Rise. We have to change the language tag manually every time. It is mandatory to fulfill the accessibility criteria in EU, so I am adding my vote for this error to be corrected asap. Thank you.
Hi HanneJacobsen-7,
Quick clarification to my earlier reply here.
We released a fix that resolves an issue where the HTML language attribute stayed set to en after translating a Rise course. When authors translate their course using XLIFF, including translating both the course content and labels, the correct page language is now set in the published output, as long as a supported ISO language code is used.
That said, there are still limitations. If only custom labels are used (without full XLIFF translation), there isn’t currently a way to customize the HTML language attribute. We recognize how important this is for accessibility compliance, and feedback like this continues to be shared with our product team.
Thanks for raising this and for your patience as we keep improving this area.
- EricSantosStaff
Thanks for adding your voice here, HanneJacobsen-7! You’re right to call out how critical this is, especially for public sector courses and compliance with EU accessibility requirements.
At the moment, Rise doesn’t offer a way to reliably define and persist the HTML source language in the published output, which can cause screen readers to use the wrong language and pronunciation. While there are workarounds, like scripts or translation workflows, we understand those aren’t ideal or sustainable, particularly when courses are republished.
I’ve shared your feedback with our product team so they can see how important it is to be able to set and save the correct language tag directly in Rise. We really appreciate you highlighting the real accessibility impact this has.
- Amanda-GunningCommunity Member
Great that there is a workaround - thank you. In addition adding my support to this cause as we need a easy solution that enables us to change the language directly in the Rise file and for that change to actually save. I think that having to remember to add the script each time we republish the course can easily be forgotten.
- PhilFossCommunity Member
MarcinZarod thanks for the script. This is a bit experimental, but I've modified it to include adding RTL direction on the body tag (on html tag doesn't work) for Arabic and other rtl languages. Only tested on a regular scorm output.
<script> (function () { try { const preferredLanguage = "ar"; // example // List of ISO language codes that use RTL direction const rtlLangs = ["ar", "he", "fa", "ur", "ps", "dv", "ku", "syr", "ug", "yi"]; const langCode = preferredLanguage.split("-")[0].toLowerCase(); function applyLangAndDir() { if (document && document.documentElement) { document.documentElement.lang = preferredLanguage; } if (document && document.body) { if (rtlLangs.includes(langCode)) { document.body.setAttribute("dir", "rtl"); } else { document.body.setAttribute("dir", "ltr"); } } } // Apply immediately applyLangAndDir(); // Monkey-patch __fetchCourse so Rise receives the preferred language var origFetch = window.__fetchCourse; if (typeof origFetch === 'function') { window.__fetchCourse = async function () { var data = await origFetch(); try { if (data) { if (data.labelSet && typeof data.labelSet === 'object') { data.labelSet.iso639Code = preferredLanguage; } if (data.course && typeof data.course === 'object') { data.course.locale = preferredLanguage; if (data.course.defaultLocaleId == null || data.course.defaultLocaleId === 'en') { data.course.defaultLocaleId = preferredLanguage; } } } } catch (e) { // ignore } // Re-apply after Rise loads its course data applyLangAndDir(); return data; } } // Backup: watch for body changes and re-apply dir const observer = new MutationObserver(() => applyLangAndDir()); observer.observe(document.body, { attributes: true, childList: true, subtree: false }); } catch (e) { // ignore } })(); </script> - MarcinZarodCommunity Member
I seemed to have solved the problem with overriding the language setting in the WEB export from RISE. In the index.html file add this script just before the closing </head>
Change "pl-PL" to your language designation.<!begining of added script> <script> (function () { try { const preferredLanguage = "pl-PL"; // 1) Set <html lang> ASAP (prevents flashes of the wrong lang) if (document && document.documentElement) { document.documentElement.lang = preferredLanguage; } // 2) Make sure the URL always carries ?locale=pl-PL so Rise picks Polish // (the app's locale resolver reads from location.search). (function ensureLocaleParam() { try { const url = new URL(window.location.href); const current = url.searchParams.get("locale"); if (current !== preferredLanguage) { url.searchParams.set("locale", preferredLanguage); // Use replaceState to avoid adding history entries. window.history.replaceState(null, "", url.toString()); } // Also patch pushState/replaceState so future navigations keep pl-PL const wrap = (fn) => function () { const ret = fn.apply(this, arguments); try { const u = new URL(window.location.href); if (u.searchParams.get("locale") !== preferredLanguage) { u.searchParams.set("locale", preferredLanguage); window.history.replaceState(null, "", u.toString()); } } catch (_) {} return ret; }; window.history.pushState = wrap(window.history.pushState); window.history.replaceState = wrap(window.history.replaceState); } catch (_) {} })(); // 3) Patch the course boot JSON so defaults are Polish if app falls back var origFetch = window.__fetchCourse; if (typeof origFetch === "function") { window.__fetchCourse = async function () { let data = await origFetch(); try { if (data) { // l10n/default locale if (data.l10n && typeof data.l10n === "object") { data.l10n.defaultLocale = preferredLanguage; // If locales array exists, prefer selecting pl-PL as the default entry if (Array.isArray(data.l10n.locales)) { const hasPL = data.l10n.locales.some(x => x.locale === preferredLanguage); if (!hasPL) { // If pl-PL is missing, add a minimal entry so the app accepts it data.l10n.locales.push({ locale: preferredLanguage }); } } // Optional label set hint some builds look at: if (data.l10n.languageCodeMetadata && !data.l10n.languageCodeMetadata[preferredLanguage]) { data.l10n.languageCodeMetadata[preferredLanguage] = { learnerDisplayName: "Polski", authorDisplayName: "Polski" }; } } // Older builds: labelSet / iso639Code sometimes used if (data.labelSet && typeof data.labelSet === "object") { data.labelSet.iso639Code = preferredLanguage; } // Course-level hints (harmless if absent) if (data.course && typeof data.course === "object") { data.course.locale = preferredLanguage; if (data.course.defaultLocaleId == null || data.course.defaultLocaleId === "en") { data.course.defaultLocaleId = preferredLanguage; } } } } catch (e) { // ignore } return data; }; } } catch (e) { // ignore } })(); </script> <!end of added script - MarcinZarodCommunity Member
I will try to follow your advice step by step. Is this <script> pasted in the appropriate place? (just before the closing <head> tag)
- peterkeijsersCommunity Member
That looks like the right spot yes!
- peterkeijsersCommunity Member
MarcinZarod We have the same issue. I've inspected the exported SCORM code from Rise and found the issue and I have a small script that can be added to the SCORM to override the Langue data property that is causing the <html> "lang" property from being set to "en".
- Decompress the exported SCORM zip.
- Open the file: scormcontent/index.html (SCORM 1.2 example)
- Change the <html lang=""> value to the right language code so when loading the html document the correct language is recognized by screenreader software for example upon loading the html document.
- The javascript method called "__fetchCourse" is responsible for loading all the course data. This course data is base64 encoded in the exported SCORM scormcontent/index.html. So one option is to decode this base64 encoded json object and adjust the property values for "labelSet.iso639Code", "course.locale" and "course.defaultLocaleId".
- Another option (the one we use) is to add a script to the scormcontent/index.html that overrides this iso639Code data property with the appropriate language value. To do this you need to add this script right before the closing <head> tag in the scormcontent/index.html file.
- Set the javascript const named "preferredLanguage" to a value you need. In our case: "nl-NL".
- This script will execute after the course data is loaded and replaces the language Rise forced. Then the regular javacript will pick this new value and updates the <html lang=""> property on the index.html document with the new correct language value.
<script> (function () { try { const preferredLanguage = "nl-NL"; // Ensure the HTML lang is correct as early as possible if (document && document.documentElement) { document.documentElement.lang = preferredLanguage; } // Monkey-patch __fetchCourse so Rise receives nl-NL var origFetch = window.__fetchCourse; if (typeof origFetch === 'function') { window.__fetchCourse = async function () { var data = await origFetch(); try { if (data) { if (data.labelSet && typeof data.labelSet === 'object') { data.labelSet.iso639Code = preferredLanguage; } if (data.course && typeof data.course === 'object') { data.course.locale = preferredLanguage; if (data.course.defaultLocaleId == null || data.course.defaultLocaleId === 'en') { data.course.defaultLocaleId = preferredLanguage; } } } } catch (e) { // ignore } return data; } } } catch (e) { // ignore } })(); </script>
- MarcinZarodCommunity Member
It worked with SCORM! Thank you so much peterkeijsers, I wonder if it's possible to create a similar script that would ovverride the language setting when exporting a RISE course to the web?
- MarcinZarodCommunity Member
It's been 8 months since somebody reported this issue. We are trying to publish a course which was written in Polish and we NEED to fulfill accessibility criteria for the EU. This is a MAJOR issue. Is there a way to change the html setting of the course while exporting it as a web page to Polish?
Hi MarcinZarod!
Glad to see peterkeijsers has been helping you. Happy to jump in here!
Rise 360 does not support setting a source language code at the time of publishing. We're tracking a feature request to introduce this level of functionality, and I've included your voice in the report.
In the meantime you can set the Polish language code (PL) by following our traditional XLIFF translation process. Once that's complete, and your Rise content is published, the Web output should inherit this setting. Here's how:
- Duplicate your Rise 360 course.
- Export the XLIFF file, and set your language code to PL, for Polish.
- Open the XLIFF file with your preferred text editor and confirm the source language code is included.
- Import your XLIFF file back into the duplicated Rise course, then publish to Web.
Let me know how it goes!
- MarcinZarodCommunity Member
It followed your tips to the letter. I typed "pl-PL" in the "Set source course language code:" window. Then I re-uploaded the Xliff file. And still after publishing it to the web, when I open the "index.html", the language indicated there is still English... The same happens when I publish to SCORM. HELP. My deadline is almost over and I have no idea what to do. My client will not accept a version marked as ENGLISH when the entire course is in Polish. The accessibility criteria are not met!
- MarcoLoVullo-fdCommunity Member
HI,
Is there any news regarding this issue? I've the same problem: no way to change the lang in HTML, Storyline is unable to show all the elements to assistive technology because it creates a sort of video, that's why I chose Rise, but this is a serious issue, too. I changed all the labels, but it's not enough, please help, my client needs a prefectly structured accessible learning object as soon ...
Thanks
Hi MarcoLoVullo-fd!
Thank you for the feedback!
I don't have any updates to share at this time, as our development team prioritizes other enhancements. I've relayed your feedback to our product team, and we'll be sure to notify you of any new developments!
- RalfHartmann-16Community Member
Hi,
is there something going on with this "wrong" language setting? In the EU the EU Accessibility Act is coming into everyones focus and the Rise courses are still in lang="en" (I used the built in label language "German" today with no other result than getting "en"). It is getting urgent now. We need the correct language setting in the code.
Thanks.
Ralf
Hi RalfHartmann-16!
Thanks for checking in on this!
Currently, Rise 360 courses do not support the ability to define the course language, within the HTML output. We understand this can be confusing for learners, as well as authors, and I've shared your feedback with our product team!
We'll be sure to notify you if we release a Rise 360 enhancement, to define the language in the HTML output and disable browser auto-translation, when unnecessary.
- JudyNolletSuper Hero
NadineBergmann : You have discovered a "bug" in how courses are published.
I just did a test in which I set the Rise Labels to German, as would be done for a course in German. Yet when I published it, it still shows html lang = "en" (indicating the page is in English). Which, as your question stated, is a problem, because a screen reader would say words based on English pronunciation instead of German.
At this point, that means you'll need to open your HTML source files with a text application, and then edit them to change the language from English to Dutch.
By the way, I would have done my testing in Dutch, but the Labels are only available in English, French, German, and Spanish.
JoseTansengco : The publishing settings should have a way to indicate the language to be used in the HTML header tag. And that should be a priority.
- PhilFossCommunity Member
Judy, unfortunately if you change the html so lang="nl", once the course loads it changes back to lang="en" so editing the html in a text editor is not a solution anymore, I believe it used to be but there must have been a recent change to prevent this.
- PhilFossCommunity Member
Although you could add lang="nl" to the <body> tag, it stays. But I'm not sure how this will affect translation software.