Say I have a data type that contains a range of values:
'DocumentType' => "Enum('CV,Supporting information,Certificate,Other','')"
Those enumerated types are used for both labels in drop-down lists (or radio buttons) *and* to define the enumerated values in the database. I would prefer to use something less "natural language" in the database to make it easier to code around, e.g. to put together custom queries, to program business logic using values such as "CV", "SUPP" and "CERT".
What would be the usual way to do this in SilverStripe? Would I use the international/translations feature, for example, to map the codes onto English phrases (CERT => Certificate) in the front end? Would this be automatic once it is set up? Would I need to use my own lookup table to do the translation, and code that translation myself?
Or would I need to hard-code a lookup table into the model in some way?
I guess this would equally apply if the module were to support multiple languages. Seeing as SS provides a lot of functionality for free, I'm just wondering if this is already covered in the core.
Edit: I think [url url="http://doc.silverstripe.org/doku.php?id=i18n"]this page[/url] is saying that I cannot use the built-in translations for the form drop-down lists, so that discounts that approach.