1

I recently got a problem when trying to use language parameter in my Visualforce pages. In a single currency org (French EUR, multi-currency feature not activated), if I set the language parameter to 'fr', I see a special character (see screenshot) displayed instead of '€' (which is correctly displayed when language is not set). More intriguing : if I set the language parameter to 'en_US', my currency fields (using apex:outputField) are displayed in... US DOLLAR!

  • Language = en_US language = en_US
  • Language = fr language = fr

Has anyone see this bug before?

Thanks!

2

Did not find a value fr in the documentation - Supported Locales; but has following values:

  • French (Belgium): fr_BE
  • French (Canada): fr_CA
  • French (Comoros): fr_KM
  • French (France, Euro): fr_FR_EURO
  • French (France): fr_FR
  • French (Guinea): fr_GN
  • French (Haiti): fr_HT
  • French (Luxembourg): fr_LU
  • French (Mauritania): fr_MR
  • French (Monaco): fr_MC
  • French (Switzerland): fr_CH
  • French (Wallis and Futuna): fr_WF

Try using any of the country/region specific values to get proper currency using apex:outputField.

  • Hi Rahul, thanks for your response, that solved the issue related to the special character \o/ Now, € is correctly displayed when using fr_FR as language. Any idea/lead about the $ symbol displayed when setting language to en_US? – Cissou Aug 22 '17 at 15:44
  • $ is currency used in United States, which is correct! – Raul Aug 22 '17 at 15:49
  • I see the default currency is US DOLLAR when setting the company locale to en_US, but not sure why this is impacting the currency fields (which should be based on the record currency...) – Cissou Aug 22 '17 at 15:50
  • Sorry I don't follow, isn't that correct? Because the language attribute in visualforce also controls the locale for date, datetime, currency fields, etc respectively. – Raul Aug 22 '17 at 15:55
  • You're correct, the language attribute controls the locale for date, datetime, currency fields, etc. But it's supposed to control the format. For example, it helps us display 1,000.00 € for en_US users and 1 000,00 € for fr_FR users. In single currency org, we now see 1 000,00 € for fr_FR, but $ 1,000.00 for en_US users even though the record currency is EUR. Not sure if what I'm trying to say is very clear :) – Cissou Aug 23 '17 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.