Internationalization - Do you make sure your language rule has an exception for Currency Fields?

Updated by Jeoffrey Fischer [SSW] 1 year ago. See history

123

<introEmbed
  body={<>
Currency formatting can vary significantly across cultures, and it's important to manage this effectively in your reports.
  </>}
/>
Although we can make the report support multiple cultures (as per [Do you make sure your language follows the users regional settings?](https://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterSQLReportingServices.aspx#LanguageSetting)), we suggest you don't do this for currency fields. Instead:

1. Have the Language set specifically to the culture you want.
e.g. If you do a report for Australian Dollars, then it should be "English(Australia)"; if for Chinese Yuan, it should be "Chinese(People's Republic of China)". Because the format of currency should not change as per user's culture setting as $100 AUD <> 100 CNY !

2. Have the currency column header set include the currency.
Because $100 USD <> $100 AUD !

<imageEmbed
  alt="Image"
  size="large"
  showBorder={false}
  figureEmbed={{
    preset: "badExample",
    figure: 'Bad example - Using default language for currency field',
    shouldDisplay: true
  }}
  src="/uploads/rules/language-rule-exception-for-currency-fields/RSCurrency_bad.gif"
/>

<imageEmbed
  alt="Image"
  size="large"
  showBorder={false}
  figureEmbed={{
    preset: "goodExample",
    figure: 'Good example - This currency field stores Australian Dollars and will always display it that way',
    shouldDisplay: true
  }}
  src="/uploads/rules/language-rule-exception-for-currency-fields/RSCurrency_good_au.gif"
/>


<imageEmbed
  alt="Image"
  size="large"
  showBorder={false}
  figureEmbed={{
    preset: "default",
    figure: 'AUD currency',
    shouldDisplay: true
  }}
  src="/uploads/rules/language-rule-exception-for-currency-fields/RSCurrency_sample_au.gif"
/>

<imageEmbed
  alt="Image"
  size="large"
  showBorder={false}
  figureEmbed={{
    preset: "goodExample",
    figure: 'Good example - This currency field stores Chinese Yuan and will always display it that way',
    shouldDisplay: true
  }}
  src="/uploads/rules/language-rule-exception-for-currency-fields/RSCurrency_good_cn.gif"
/>


<imageEmbed
  alt="Image"
  size="large"
  showBorder={false}
  figureEmbed={{
    preset: "default",
    figure: 'Chinese Yuan currency',
    shouldDisplay: true
  }}
  src="/uploads/rules/language-rule-exception-for-currency-fields/RSCurrency_sample_cn.gif"
/>

If you don't want to get currency fields hard coded in reports, you can use an expression to read settings from your database.

<imageEmbed
  alt="Image"
  size="large"
  showBorder={false}
  figureEmbed={{
    preset: "goodExample",
    figure: 'Good example - Using specified language as per value of column CurrencyType in table SystemValue',
    shouldDisplay: true
  }}
  src="/uploads/rules/language-rule-exception-for-currency-fields/RSCurrency_good_expression.gif"
/>

Acknowledgements

Jeoffrey Fischer
Related rules

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.