[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:
Christophe Simonis 2008-12-05 14:10:29 +01:00
parent f770e5e65f
commit 49916d38fd
1 changed files with 3 additions and 0 deletions

View File

@ -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