Internationalized Numbering Format

You could alter this code to accommodate the French formatting standard:

<xsl:decimal-format name="dformat"
decimal-separator=","
grouping-separator=" "/>

Then adjust the pattern format (pformat variable) to match the new separator values.

<xsl:variable name="pformat"
select="'### ###,##'"/>

Making this change causes values in the Glass Report to display as, for example, 2 395,25. For internationalizing the Glass Report, this is all you must change. For the Fiber Trace Report, you must complete not only changes to the decimal separator, grouping separator, and pattern format variable, but also additional configuration. This involves locating every further instances of "dformat" (other than those described above) and adjusting the decimal or grouping separator in those variables.

For example, this is the default code that determines the style of a particular column's values:

<td class="length">
<xsl:value-of select="format-number($length, '###,##0.##', 'dformat')"/>
 </td>

Following the same example as above (changing the report to accommodate the French formatting standard) you would need to change that code as follows in order for the report, and the new numbering format, to display properly:

<td class="length">
<xsl:value-of select="format-number($length, '### ##0,##', 'dformat')"/>
</td>
TIP: Learn more about the xslt function and element involved:
QR code for this page

Was this helpful?