Closed johanlavenius closed 9 months ago
The _defaultLanguage of the config.json may help. You should just need to set it to sv
and change the course/en
folder to course/sv
. This code in Adapt should do the rest for you.
We also have this readme and tooling on translations and a plugin for multi language courses called adapt-contrib-languagePicker
Spoor, this extension, is really only for implementing the SCORM API to communicate with an LMS.
I know about the _defaultLanguage in the config.json but that doesn´t fix the problem. Maybe it fires too late? Maybe Chrome checks the lang-attribute with javascript turned off.
If i manually change the lang-attribute in the index_lms.html from en to sv all is working as expected.
Ok, cool.
References: https://www.matuzo.at/blog/lang-attribute/ https://github.com/vuejs/vue-cli/issues/5945 https://github.com/h5bp/html5-boilerplate/issues/1542
I'm going to move this issue to adapt-contrib-core and have a brief look.
Please try the two pull requests attached.
Works perfectly
Could you please mark your satisfaction on both prs? We have a 3 review protocol to get them merged.
:tada: This issue has been resolved in version 6.45.5 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Subject of the issue/enhancement/features
index_lms.html contains and is not reflecting the language of the course and Chrome translates the course with "wrong words" when certain settings is used.
Your environment
Steps to reproduce
Create a course in Swedish. Use for example the Swedish word "Hat" (Meaning hate). In Chrome (chrome://settings/languages) activate Google Translate. Set Translate to Swedish. Add English to the list of languages that should be translated automatically.
Expected behaviour
The example swedish word "Hat" should still show up as the swedish word "Hat".
Actual behaviour
The swedish word "Hat" is translated to "Hatt" (Its also a swedish word meaning hat. The thing you wear on your head).
This translation can be difficult to find in a long course. Most of the words seems just fine.
Suggestion
The lang-attribute should reflect the language setting of the course or a separate setting in adapt-contrib-spoor.