This repository contains Learnosity internationalization language bundles originally put together as POC for customers to see how the APIs can be translated. You can see these bundles in action in our internationalization demo.
Please refer to this knowledge base article for more information about translating the Learnosity user interface.
Each file in this repository corresponds to the RFC-5646 locale code for each language. This contains the language and region separated by a dash, e.g. en-US, de-DE, or ar-EG.
The default language in all Learnosity APIs is en-US.
The purpose of these files is to show how the Learnosity Authoring, Assessment, and Reporting APIs can be translated or adjusted to suit individual needs. These are not officially supported by Learnosity but can serve as a solid base for any customer interested to translate the user interface.
Our label bundles translate user-interface elements, such as buttons, dialogs, and labels. This means that customers will need to translate their question content (eg the question stems), this gives you the flexibility to pick and choose which UI elements to localize. For example, you might typically localize a student's assessment player (assess-api.json, and possibly portions of questions-api.json, depending on what they want to use). But you may only have to add translations for the specific reports you intend to use if any (reports-api.json).
These label bundles provided by Learnosity were created to illustrate the capabilities for translation of the Learnosity interface. Note, many of these language bundles are machine-translated, so you will want to verify all of these translations with native speakers before putting them into production. See the table below for information about the translations, some of which were translated by volunteers.
Due to our fast pace of innovation, some new features in the product will not be translated, yet.
If you would like to translate our APIs into another language, please make a pull request by adding languages/label_bundles/<language>-<region>/<api>.json
.
For example:
├── languages
│ ├── en-GB
│ │ ├── label_bundles
│ │ │ ├── assess-api.json
├── README.md
Each language contains 4 possible folders:
- author_assets
- label_bundles
- qe_custom_types
- qe_template_thumbnails
The Author API has an image that contains an English string. This is used when the item list is empty (either no items exist, or the search returned no results). See pt-PT for a sample of how this can be used to replace the default image.
This is the main folder containing a JSON file for each of the APIs that support translations:
- assess-api.json
- author-api.json
- questioneditor-api.json
- questions-api.json
- reports-api.json
To override labels for the Items API (Learnosity's primary assessment API) you can use the following initialization object, note there are 2 locations to pass translations:
- the assessment player (assess-api.json) in
config.labelBundle
- individual question types (questions-api.json) in
config.questions_api_init_options.labelBundle
:
{
"activity_id": "[YOUR-ACTIVITY-ID]",
"name": "[YOUR-ASSESSMENT-NAME]",
"rendering_type": "assess",
"type": "submit_practice",
"session_id": "[YOUR-SESSION-ID]",
"user_id": "[YOUR-ASSESSMENT-USER]",
"config": {
"labelBundle": {
},
"questions_api_init_options": {
"labelBundle": {
}
}
}
}
To override labels for the Author API (Learnosity's primary authoring API) you can use the following initialization object, note there are 3 locations to pass translations:
- the authoring wrapper (author-api.json) in
config.label_bundle
- the question editing layer (questioneditor-api.json) in
config.dependencies.question_editor_api.init_options.label_bundle
- where question types are rendered in
config.dependencies.questions_api.init_options.labelBundle
Note: that there is a discrepancy between the Assessment and Authoring APIs around the format of the label bundle attribute. Assessment uses labelBundle
while Authoring uses label_bundle
. This is due to a later decision in Authoring to standardize using snake_case.
{
"mode": "item_list",
"config": {
"label_bundle": {
},
"dependencies": {
"question_editor_api": {
"init_options": {
"group_defaults": true,
"question_type_groups": [
],
"question_type_templates": {
},
"label_bundle": {
}
}
},
"questions_api": {
"init_options": {
"labelBundle": {
}
}
}
}
},
"user": {
"id": "demos-site",
"firstname": "demos",
"lastname": "User"
}
}
To override labels for the Reports API you can use the following initialization object:
{
"reports": [
],
"label_bundle": {
}
}
This folder can contain 2 files for Question Editor API custom groups and templates:
- question_type_groups.json
- question_type_templates.json
Question Type Groups can be used to localize the categories of question types available to authors in the left-hand sidebar.
Question Type Templates define the collection of JSON attributes shown (along with localized default values) to authors when editing a question type.
When creating questions, authors can select which question type template they want to use. This UI displays a series of thumbnail images that preview a sample of how the question type will render, allowing authors to make the right decision.
Ideally, these static images would be refreshed with new (translated) content. This is a location you can choose to store these thumbnails.
The following table summarizes the language files available to try:
Authoring | Assessment | Reporting | ||||
---|---|---|---|---|---|---|
Language | Code | Author API | Question Editor API | Assess API | Questions API | Reports API |
Arabic (Egyptian) | ar-EG | Y | Y | Y | Y | N |
Chinese (Simplified) | zh-CN | Y | Y | Y | Y | Y |
Dutch (Netherlands) | nl-NL | Y | Y | Y | Y | Y |
English (United Kingdom) | en-GB | Y | Y | Y | Y | N |
English (United States) - Default | en-US | Y | Y | Y | Y | Y |
French | fr-FR | Y | Y | Y | Y | Y |
German | de-DE | Y | Y | Y | Y | Y |
Hindi | hi-IN | Y | Y | Y | Y | Y |
Italian | it-IT | Y | Y | Y | Y | Y |
Japanese | ja-JP | Y | Y | Y | Y | Y |
Korean | ko-KR | Y | Y | Y | Y | Y |
Portuguese | pt-PT | Y | Y | Y | Y | Y |
Russian | ru-RU | Y | Y | Y | Y (partial) | N |
Spanish | es-ES | Y | Y | Y | Y | Y |
Swedish | sv-SE | Y | Y | Y | Y | Y |
Tagalog | tl-PH | Y | Y | Y | Y | Y |
Vietnamese | vi-VN | Y | Y | Y | Y | Y |
For the Code column, the first lower-case two-letter code is a valid ISO Language Code. These codes are defined by ISO-639. When picking your language code, please use the correct code from the 639-1 column here. The upper-case two-letter code is a valid ISO Country Code. These codes are defined by ISO-3166. When picking your country code, please use the correct code from the Alpha-2 code column here.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.