You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The choices array consists of simple strings, which works well in most cases. However, it becomes problematic when combined with internationalization (i18n).
issue
When using i18n, choices are often defined dynamically, like this:
Each option has a localized display value depending on the user's language. However, the issue is that the stored value in the step is the translated label rather than a stable identifier. This means that the value depends on the language of the user who configured it, leading to inconsistencies when different users with different languages interact with the same data.
Feature request
It would be great to allow defining choices as an array of objects with an id and a displayValue, ensuring that the stored data is always the id, while the displayed value can be localized.
The stored value remains consistent (id), avoiding issues caused by language changes.
The displayed value can be localized dynamically based on the user's language.
It's definitly not a priority butt would significantly improve handling of choice-based inputs in internationalized applications.
Thanks! 😊
The text was updated successfully, but these errors were encountered:
please check the 0.14.8 version. Also I added examples to this demo. Basically, the idea is very simple: in the definition JSON, you should store the primary language.
Hello.
Currently, the choice editor is configured like this:
The
choices
array consists of simple strings, which works well in most cases. However, it becomes problematic when combined with internationalization (i18n).issue
When using i18n, choices are often defined dynamically, like this:
Each option has a localized display value depending on the user's language. However, the issue is that the stored value in the step is the translated label rather than a stable identifier. This means that the value depends on the language of the user who configured it, leading to inconsistencies when different users with different languages interact with the same data.
Feature request
It would be great to allow defining choices as an array of objects with an id and a displayValue, ensuring that the stored data is always the id, while the displayed value can be localized.
For example:
With this approach:
The stored value remains consistent (id), avoiding issues caused by language changes.
The displayed value can be localized dynamically based on the user's language.
It's definitly not a priority butt would significantly improve handling of choice-based inputs in internationalized applications.
Thanks! 😊
The text was updated successfully, but these errors were encountered: