Skip to content

Commit

Permalink
Add locale to survey docs (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
becky-gilbert authored Nov 1, 2024
1 parent 4df1e26 commit bbdac4a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/purple-phones-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@lookit/surveys": patch
"@lookit/record": patch
---

Documentation update: add/modify locale parameter documentation.
4 changes: 2 additions & 2 deletions packages/record/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ either a single trial or multiple trials.

Optional parameter to set a two-letter language code for translation. In some
cases, a regional code will have to be provided as well. For example, we
currently support english only from the US region. Therefore, to get the US
english translation you would put "en-US" for the locale. We support the
currently support English only from the US region. Therefore, to get the US
English translation you would put "en-US" for the locale. We support the
following language codes:

| Language | Region | Code |
Expand Down
22 changes: 22 additions & 0 deletions packages/surveys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@ This package contains the custom surveys provided by CHS for jsPsych studies.
These surveys are built off of the very nice [jsPsych
Survey plugin]({{ jsPsych }}plugins/survey/).

## Parameters available in all plugins

**`locale` [String | "en-us"]**

Optional parameter to set a two-letter language code for translation. In some
cases, a regional code will have to be provided as well. For example, we
currently support English only from the US region. Therefore, to get the US
English translation you would put "en-US" for the locale. We support the
following language codes:

| Language | Region | Code |
| -------------- | ------ | ----- |
| Basque | | eu |
| Dutch, Flemish | | nl |
| English | U.S.A. | en-US |
| French | | fr |
| Hungarian | | hu |
| Italian | | it |
| Japanese | | ja |
| Portuguese | Brazil | pt-BR |
| Portuguese | | pt |

## Consent Survey

The Consent Survey will will give you two things out of the box:
Expand Down

0 comments on commit bbdac4a

Please sign in to comment.