Globebyte Documentation
  • AI Agents for Learning
  • Assess for Learning
    • Creating the Assess Connected App
    • Setting up Assess for Learning
    • Viewing Assessments
    • Assessment Outcomes & Validation
    • Marking
    • Best Practices
  • Tutor for Learning
    • Setting up Tutor
    • Agent Actions
      • Tutor_Mark
      • Tutor_Task
      • Tutor_Criterion
      • Tutor_SenseMaking
      • Tutor_Instruction
    • Topics
      • Tutor_Assessment
      • Tutor_Knowledge
  • Data for Learning
  • Actions for Learning
    • Creating the xAPI Actions Connected App
    • Setting up xAPI Actions
    • Creating your first xAPI Action Flow
    • xAPI Statement Data explorer
      • Metadata
      • xapiActor
      • xapiVerb
        • Verb reference
      • xapiObject
      • authority
      • xapiResult
      • xapiContext
    • Filtering xAPI Statements
    • Viewing xAPI Statements
    • Viewing xAPI Usage
    • Setting a default statement language
    • Error messages and troubleshooting
  • Experience for Learning
    • Setting up xAPI for Salesforce
    • Send xAPI from a Flow
    • Form Action fields
    • Send xAPI from Apex
    • xApiStatement Class reference
      • Actor
      • Verb
      • Object
      • Context
      • Result
      • Authority
      • Version
      • Send methods
    • Logging and defaults
  • Learning Journey Model
    • Introduction
    • Curriculums & Pathways
    • Courses & Modules
    • Pedagogies & Objectives
    • Rubrics & Criteria
    • Learning Resources
    • Assessments & Tasks
    • Learning Groups
    • Step-by-step working example
    • Activity Tracking (Advanced)
    • Additional Pedagogies Reference
    • Best Practices
    • Assess for Learning Integration
    • Data for Learning Integration
    • Object References
      • Learning Curriculum
      • Learning Pathway
      • Learning Course
      • Learning Module
      • Learning Pedagogy
      • Learning Objective
      • Learning Objective Assignment
      • Learning Rubric
      • Learning Rubric Criterion
      • Learning Rubric Model Solution
      • Learning Resource Type
      • Learning Resource
      • Learning Assessment
      • Learning Text Task
      • Learner Text Attempt
      • Learner Text Criterion Score
      • Learning Choice Task
      • Learner Choice Attempt
      • Learner Mark
      • Learning Group
      • Learner Group Membership
      • Learner Activity
      • Learner Activity Instance
      • Learner XAPIStatement
      • Developer Cheat Sheet: Key LDM Objects
  • Globebyte.com
Powered by GitBook
On this page
  • Some context
  • Language setting
  • Code reference
  1. Actions for Learning

Setting a default statement language

Some context

The Language Code field in xAPI statements, such as "en-US" for English (United States) or "en-GB" for English (United Kingdom), is important because it ensures that the xAPI data and content are correctly interpreted according to the learning environment's adopted language and the language/dialect expected from inbound xAPI statements.

Here's an example of language codes being used in an xAPI statement:

{
  "actor": {
    "name": "Jane Doe",
    "mbox": "mailto:jane.doe@example.com"
  },
  "verb": {
    "id": "http://adlnet.gov/expapi/verbs/completed",
    "display": {
      "en-US": "completed"
    }
  },
  "object": {
    "id": "http://example.com/courses/actuarial-course",
    "definition": {
      "name": {
        "en-US": "Science Course",
        "fr-FR": "Cours de science"
      },
      "description": {
        "en-US": "An advanced course on science principles.",
        "fr-FR": "Un cours avancé sur les principes de la science."
      }
    }
  },
  "result": {
    "completion": true,
    "success": true,
    "score": {
      "scaled": 0.95
    }
  },
  "context": {
    "language": "en-US"
  }
}
  • The display field in the verb element uses "en-US" to specify the language of the verb ("completed").

  • The name and description fields in the object element include both "en-US" and "fr-FR" versions, showing how the course name and description can be presented in different languages.

  • The context field's language attribute is set to "en-US", indicating that the overall statement is processed in U.S. English.

Troubleshooting tip: On completing your setup, if inbound xAPI Statements are incomplete (e.g there is no "Verb" data displaying) this may be due to an unexpected language in the xAPI statement structure. Setting default language(s) according to your expectations may resolve any issues.

Language setting

From the Salesforce Setup screen, use Quick Find to locate “Custom Settings”.

Open Custom Settings. Note that your browser will need to accept cross-domain cookies, otherwise you will need to view this page in "Salesforce Classic".

Locate the entry for xAPI Actions Settings and select the Manage link:

Select New:

Set your location/language codes as described below:

  • Select Location type: Profile Profile/User value option

  • Enter the default language in the Language Codes field, for example "en-US"

    • To enter multiple language codes use comma separation, for example "en-US","en-GB","fr-CA" etc.

    • Only up to 2 languges are currently supported.

Save the setting.

Code reference

Here’s a reference list of commonly used language codes. These language codes follow the ISO 639-1 standard for language codes, often combined with a country code (ISO 3166-1 alpha-2) to specify the regional dialect.

English Variants:

"en-US": English (United States)

"en-GB": English (United Kingdom)

"en-AU": English (Australia)

"en-CA": English (Canada)

"en-IN": English (India)

"en-NZ": English (New Zealand)

Spanish Variants:

"es-ES": Spanish (Spain)

"es-MX": Spanish (Mexico)

"es-AR": Spanish (Argentina)

"es-CO": Spanish (Colombia)

"es-CL": Spanish (Chile)

French Variants:

fr-FR": French (France)

"fr-CA": French (Canada)

"fr-BE": French (Belgium)

"fr-CH": French (Switzerland)

German Variants:

"de-DE": German (Germany)

"de-AT": German (Austria)

"de-CH": German (Switzerland)

Portuguese Variants:

"pt-PT": Portuguese (Portugal)

"pt-BR": Portuguese (Brazil)

Chinese Variants:

"zh-CN": Chinese (Simplified, China)

"zh-TW": Chinese (Traditional, Taiwan)

"zh-HK": Chinese (Traditional, Hong Kong)

Arabic Variants:

"ar-SA": Arabic (Saudi Arabia)

"ar-EG": Arabic (Egypt)

"ar-AE": Arabic (United Arab Emirates)

"ar-MA": Arabic (Morocco)

Russian:

"ru-RU": Russian (Russia)

Japanese:

"ja-JP": Japanese (Japan)

Korean:

"ko-KR": Korean (South Korea)

Italian:

"it-IT": Italian (Italy)

"it-CH": Italian (Switzerland)

Dutch Variants:

"nl-NL": Dutch (Netherlands)

"nl-BE": Dutch (Belgium)

Swedish:

"sv-SE": Swedish (Sweden)

Norwegian:

"no-NO": Norwegian (Norway)

Danish:

"da-DK": Danish (Denmark)

Finnish:

"fi-FI": Finnish (Finland)

Polish:

"pl-PL": Polish (Poland)

Turkish:

"tr-TR": Turkish (Turkey)

PreviousViewing xAPI UsageNextError messages and troubleshooting

Last updated 8 months ago