Repository navigation
chore: documents how Web Forms determines form and UI language - #2121
Conversation
|
|
||
| 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 |
There was a problem hiding this comment.
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
| 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. |
There was a problem hiding this comment.
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
| } | ||
| </style> | ||
|
|
||
| .. csv-table:: |
There was a problem hiding this comment.
Taken from here: getodk/web-forms#332 (comment)
|
@lognaturel could you please review? :) form-lang-docs.mp4 |
lognaturel
left a comment
There was a problem hiding this comment.
Small suggestion but looks great, thanks!
| #. 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. |
There was a problem hiding this comment.
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.
|
@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. |
|
@latin-panda It looks good! I have no extra comments :) |
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