You need to sign in to do that
Don't have an account?

Datetime.format - Support Language?
I have an Apex routine that generates a formatted date for an Event, e.StartDateTime.format('MMM d, YY').
When logged in as a French user, the Month format is not changed to a French abbreviation. Is there a way to accomplish this?
When logged in as a French user, the Month format is not changed to a French abbreviation. Is there a way to accomplish this?
If you are displaying this Date (i.e. in a Visualforce) , you can use e.StartDateTime.format(). It converts the date to the local time zone and returns the converted date as a formatted string using the locale of the context user.
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_datetime.htm#apex_System_Datetime_format (https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_datetime.htm#apex_System_Datetime_format" target="_blank)
Regards.
Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.
In the Apex Class, I've turned on debugging, and see the language is "fr", but the month still renders in English (e.g. "Feb" instead of "Fév").
Any thoughts?
Is the user properly configured? Make sure you have the user's locale configuration with the right settings.
Regards.
Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.