Hi FF community,
I want to display a language list to users e.g. English, German, Spanish and then I want to store the data as language code e.g. en, de, es.
It seems the solution to this would be through an Enum but FF Enums only have values not a key - value pair.
As an alternative I thought the FF App Constants would solve this via;
1- Defining a Language Data Type with languageCode and languageName as the fields.
2- Creating an App Constant with Constant Type as Language Data Type and making it a list
However Data Type is not available as a Constant Type.
As workarounds, I see 2 options
a- Creating 2 separate Enums; languageCode and languageName. This solves the initial display of the values easily but then when I want to display the languageName again to users for the previously created document then this does not address the need easily because these Enums are not actually mapped.
b- Writing a function to convert the Language value to the languageCode and storing that separately (or also write a back conversion function)
However, all these seem like unnecessary complexity so I would like to understand; am I missing out something simple here or should this be a feature request to FF team?
Cheers,
Reha