When including multilingual keywords in the generated JATS, Journal::getSupportedLocales() is used to determine which languages should be included. This uses the underlying key of supportedLocales as a setting name in in the journal_settings table in the database, which make sense. However, there is a mismatch of expectations in the language used in the code/db and the language used in the frontend, which expresses itself a checkbox to enable a language for the UI of the site (in contrast to forms and submission). This tying of a "supported UI" presentation framing to a "supported locales" framing makes ambiguous which localized keywords should be included.
To answer
[x] Is the UI language/getSupportedLocales() journal setting the correct one to be using? No.
[x] Should all available multilingual data be made available regardless of settings? Maybe, but using a different setting.
[x] Are there any cases where multilingual keywords may have been added but should be excluded from the generated JATS? No longer relevant.
Solution
Use Context::getSupportedSubmissionLocales() instead, as this will match the available locale options for adding submission metadata.
When including multilingual keywords in the generated JATS,
Journal::getSupportedLocales()
is used to determine which languages should be included. This uses the underlying key ofsupportedLocales
as a setting name in in thejournal_settings
table in the database, which make sense. However, there is a mismatch of expectations in the language used in the code/db and the language used in the frontend, which expresses itself a checkbox to enable a language for the UI of the site (in contrast to forms and submission). This tying of a "supported UI" presentation framing to a "supported locales" framing makes ambiguous which localized keywords should be included.To answer
getSupportedLocales()
journal setting the correct one to be using? No.Solution
Use
Context::getSupportedSubmissionLocales()
instead, as this will match the available locale options for adding submission metadata.