[IMP] amount_to_text: add a function allowing to register a convertion function (patch from Activity Solutions)
bzr revid: christophe@tinyerp.com-20081205131029-s05x7qtisskcekzw
This commit is contained in:
parent
f770e5e65f
commit
49916d38fd
|
@ -171,6 +171,9 @@ def amount_to_text_nl(number, currency):
|
|||
#-------------------------------------------------------------
|
||||
|
||||
_translate_funcs = {'fr' : amount_to_text_fr, 'nl' : amount_to_text_nl}
|
||||
|
||||
def add_amount_to_text_function(lang, func):
|
||||
_translate_funcs[lang] = func
|
||||
|
||||
#TODO: we should use the country AND language (ex: septante VS soixante dix)
|
||||
#TODO: we should use en by default, but the translation func is yet to be implemented
|
||||
|
|
Loading…
Reference in New Issue