You need to sign in to do that
Don't have an account?
Fabio Scheurel
Set locale/language when querying a custom label
Hi there,
I would like to query a custom label in APEX based on a specific locale/language. Currently, when using Label.My_Label, the My_Label value is always returned using the current user's locale.
However, when performing specific actions like creating Tasks, Events etc. in a trigger, that trigger might run in a system user's or an API user context. However, the content in the Tasks, Events etc. should be localized for a specific contact. I have no idea how I can achieve such thing.
I appreciate your help, thanks!
Fabio
I would like to query a custom label in APEX based on a specific locale/language. Currently, when using Label.My_Label, the My_Label value is always returned using the current user's locale.
However, when performing specific actions like creating Tasks, Events etc. in a trigger, that trigger might run in a system user's or an API user context. However, the content in the Tasks, Events etc. should be localized for a specific contact. I have no idea how I can achieve such thing.
I appreciate your help, thanks!
Fabio
an idea is referenced (https://success.salesforce.com/ideaView?id=08730000000714W) in the SE thread, thanks for pointing me to it. Yes, it is not possible at the moment.
However, it gave me an idea of a workaround using custom list settings where you provide list values for each required language. Access to that setting should be capsulated into a helper class (utility).
Regards
Fabio
All Answers
an idea is referenced (https://success.salesforce.com/ideaView?id=08730000000714W) in the SE thread, thanks for pointing me to it. Yes, it is not possible at the moment.
However, it gave me an idea of a workaround using custom list settings where you provide list values for each required language. Access to that setting should be capsulated into a helper class (utility).
Regards
Fabio