I want to show currency on VF page in different formats based on locale used on the template. NumberFormat class is available in Java to achieve this but in apex is there any way to achieve this.

Locale - Formatted Numbers German (Germany)- 123.456,789 English (United States) - 123,456.789

I am using a VF page for the Quote PDF and I have the locale in Quote Template. Based on this value from the template I want to format the numbers on the PDF.

locale is not supplied from the user record but thru another table.

1 Answer 1


There was a somewhat related question today where the answer was simply using <apex:outputField> cause it takes care of the way the field is displayed.

This is a simple copy paste from Dereks Answer:

A read-only display of a label and value for a field on a Salesforce object. An <apex:outputField> component respects the attributes of the associated field, including how it should be displayed to the user. For example, if the specified <apex:outputField> component is a currency field, the appropriate currency symbol is displayed. Likewise, if the <apex:outputField> component is a lookup field or URL, the value of the field is displayed as a link.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .