I'm not familiar with this but looking at the internal tool, it looks like;
zeroDigit data is coming from "commmon/upplemental/numberingSystems.xml".
defCurrencyCode is coming from "common/supplemental/supplementalData.xml".
monetarySeparator is under "numbers/symbols/decimal" locale data.
monetaryGroupingSeparator is under "numbers/symbols/group" locale data.
currency patterns are coming from the currencyFormats section of locale data.
Logic for simpleCurrencyPattern:
def CreateSimpleCurrencyPattern(ref_pattern):
"""Return simple currency pattern.
Before this pattern is available in CLDR, created based on general currency
pattern by applying this transformation:
\\00a4+ ==> \\u00a4\\u00a4\\u00a4\\u00a4
Args:
ref_pattern: pattern to unescape to create the simple pattern
Returns:
simple currency pattern.
"""
return re.sub(ur'\u00a4+', ur'\u00a4\u00a4\u00a4\u00a4', ref_pattern, 0)
Logic for globalCurrencyPattern:
def CreateGlobalCurrencyPattern(ref_pattern):
"""Return global currency pattern.
Before this pattern is available in CLDR, created based on simple currency
pattern.
Args:
ref_pattern: pattern to escape to create the global pattern
Returns:
the global currency pattern
"""
simple_pattern = CreateSimpleCurrencyPattern(ref_pattern)
global_pattern = ''
in_quote = False
for ch in simple_pattern:
if ch == '\'':
in_quote = not in_quote
elif ch == ';' and not in_quote:
global_pattern += ur' \u00a4\u00a4'
global_pattern += ch
global_pattern += ur' \u00a4\u00a4'
return global_pattern