function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Antonio Jesús Criado ManzanequeAntonio Jesús Criado Manzaneque 

Get a Salesforce default message in Apex code to use its content

I am working with some input fields (apex:inputField) and I want to show an standard error message ('You must enter a value') but I want it with its translation, so I would like to introduce this error as a parameter in my Apex class.

eg. currently using: 
Apexpages.addMessage(new ApexPages.Message (ApexPages.Severity.ERROR, Case.MEL_SEL_Subtipo__c.getDescribe().getLabel()+': You must enter a value'));

I would like to use something like this: 
Apexpages.addMessage(new ApexPages.Message (ApexPages.Severity.ERROR, Case.MEL_SEL_Subtipo__c.getDescribe().getLabel()+ ***ApexPages.NoDataError.getContent()***));


Thank you.