Skip to content

chore: documents how Web Forms determines form and UI language - #2121

Merged
latin-panda merged 2 commits into
masterfrom
web-forms-language-selection
Oct 23, 2026
Merged

latin-panda merged 2 commits into
masterfrom
web-forms-language-selection

Conversation

@latin-panda

Copy link
Copy Markdown
Contributor

closes #

addresses #2100

What is included in this PR?

Updates docs about how Web Forms determines languages

What new issues will need to be opened because of this PR?

none

What is left to be done in the addressed issue?

nothing

What problems did you encounter?

none

Comment thread docs/web-forms-intro.rst

For language matching to work, include the language code in parentheses in your language names (for example ``English (en)``), as described in :doc:`form-language`. A language without a code (for example ``Frans``) can still be selected manually, but it cannot be matched to the browser language or remembered across forms; interface text and date formats then follow the browser language. Regional codes such as ``English (en-US)`` are matched exactly when possible; otherwise, any variant of the same base language matches.

.. dropdown:: Detailed language selection scenarios

@latin-panda latin-panda Oct 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main audience for this section is devs, QA, and more experienced form designers.
We can use this grid for answering questions, or testing in the future

Comment thread docs/web-forms-intro.rst
Beyond the form's question text, two other kinds of text follow their own language rules:

- **Interface text** (buttons and status dialogs) is available in English, español, français, and bahasa Indonesia. Web Forms uses the one that matches the form language being displayed, falling back to English. If you would like to contribute additional languages, follow the `ODK Central translation guide <https://docs.google.com/document/d/1C0MS_ytAEBHwbMkdR-QrtDrWAAh_EkJo2QRr4XyIOpk>`_ and if you have questions, post in the `translation category <https://forum.getodk.org/c/development/translation/14>`_ on the ODK Forum.
- **Date formats** in calendar widgets follow the form language being displayed, preferring the browser's regional variant of it when there is one. For example, a browser set to Australian English sees Australian date formats in an English form. If date formats are not available for the form language, English formats are used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is PrimeVue, but not many will know which part of the UI is PrimeVue, so I just mentioned the calendar, which is the component with the most text that get translated

Comment thread docs/web-forms-intro.rst
}
</style>

.. csv-table::

@latin-panda latin-panda Oct 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@latin-panda

Copy link
Copy Markdown
Contributor Author

@lognaturel could you please review? :)

form-lang-docs.mp4

@lognaturel lognaturel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small suggestion but looks great, thanks!

Comment thread docs/web-forms-intro.rst Outdated
#. The first of the browser's preferred languages that matches a form language.
#. The first language defined in the form.

The user may select their preferred language from the language selector dropdown shown at the top of the form.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding "If the form defines multiple languages, ..." I know you say this is about the "form language" but I think it may not be totally clear.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! Thanks

@latin-panda

Copy link
Copy Markdown
Contributor Author

@srujner, I'm adding more information about Web Forms translations to the docs, including a table of scenarios that’s useful when checking a specific case.
Here is a video showing the rendered site, please let me know any feedback :)

@srujner

srujner commented Oct 23, 2026

Copy link
Copy Markdown

@latin-panda It looks good! I have no extra comments :)

@latin-panda
latin-panda merged commit e13d34c into master Oct 23, 2026
4 checks passed
@latin-panda
latin-panda deleted the web-forms-language-selection branch October 23, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants