The project I am working on supports many languages and Case record types.
There is also a large amount of dependency between the Case record type and the Case type field (but it isn't one-to-one and there are other variables).
So, we have a trigger which includes like this:
newCase.recordTypeId = Schema.SObjectType.Case.RecordTypeInfosByName.get(newCase.Type).RecordTypeId;
However, if/when newCase.Type has been localized, we get a null pointer exception.
So, we need to reverse translation before we can do this.
More, it CAN happen that on a bulk job, the current User is inserting or updating records for users of multiple languages (so we can't "simply" map toLabel against the picklist schema).
We'd rather not hard code a map for reverse translations, nor need to convert our translation files into another set of data to be imported for custom settings.
Does SFDC offer any functionality which could allow us to "untranslate", or that failing, to dynamically create a map from multiple supported languages?