def in_words(integer, in_million=True):
 locale = (u'en_IN' if (not in_million) else frappe.local.lang)
 integer = int(integer)
 try:
  ret = num2words(integer, lang=locale)
 except NotImplementedError:
  ret = num2words(integer, lang=u'en')
 return ret.replace(u'-', u' ')

def in_words ( integer , in_million = True ) : locale = ( u'en_IN' if ( not in_million ) else frappe . local . lang ) integer = int ( integer ) try : ret = num2words ( integer , lang = locale ) except NotImplementedError : ret = num2words ( integer , lang = u'en' ) return ret . replace ( u'-' , u' ' )
returns string in words for the given integer .