% This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04
% Example 43 Currency Formats (GB and IE Regions)
% Label: "ex:multiregioncurrency"
% arara: xelatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage[locales={en-GB,en-IE}]{datatool-base}
\DTLsetLocaleOptions{GB}{ number-style = education }
\DTLsetup{numeric={auto-reformat}} 
\begin{document}
\DTLGBLocaleHook
Currency code: \DTLCurrencyCode.
Currency symbol: \DTLCurrencySymbol. 

\DTLdecimaltocurrency{12345.678}{\GBformattedresult}
Formatted: \GBformattedresult.
(Numeric value: \DTLdatumvalue{\GBformattedresult}.) 

Parsing £12 345.67.
\DTLparse\GBparsed{£12 345.67}


Parsed: \GBparsed.
(Numeric value: \DTLdatumvalue{\GBparsed}.) 

\DTLIELocaleHook
Currency code: \DTLCurrencyCode.
Currency symbol: \DTLCurrencySymbol. 

\DTLdecimaltocurrency{12345.678}{\IEformattedresult}
Formatted: \IEformattedresult.
(Numeric value: \DTLdatumvalue{\IEformattedresult}.) 

Parsing €12,345.67.
\DTLparse\IEparsed{€12,345.67}


Parsed: \IEparsed.
(Numeric value: \DTLdatumvalue{\IEparsed}.) 

\DTLsetup{numeric={currency-symbol-style=iso}}
\DTLsetLocaleOptions{GB,IE}{currency-symbol-position=after}
\begin{enumerate}
\item \GBformattedresult.
\item \GBparsed.
\item \IEformattedresult.
\item \IEparsed.
\end{enumerate} 
\end{document}
