Convert Number To Word

Hello,

We are usign the pluging Convert Number To Word:

but I need in spanish language, 

Someone knows if I can traslate it? usign plugins or somehing like that?

Thank you so much, regards.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    It might seem like a lot of work, but I wonder how much work it would be to build the plugin in Spanish, and possibly multiple other languages, yourself.  You could just make a new plugin from scratch.  A lot of work yes, but more work than getting google translate to work?  Plus you save yourself bandwidth and google AI requests.

    Plus, you could then sell your new multilingual convert number to words plugin on the marketplace!

  • Hello, and do you know if we can take the code of the pluging? thank you

  • 0
    Certified Lead Developer
    in reply to mteresa

    As far as I am aware, it would be against the wishes of the developers of that plugin for you to reverse engineer their code.  I haven't looked, but I really don't feel that I even need to look to see a request to not reverse engineer their code.  However, it's honestly not such a terribly difficult problem.

    I created an Appian based rule that does the same thing, only it handled all numbers all the way up to nine hundred and ninety-nine centillion, so any number of digits up to 306 digits.  But that was only in English.

    You could either create it as an Appian rule, or you could create a Java program that does it.  That would be where I would start.  Once it outputs as you like on your Java console, only then worry about porting it over to an Appian plugin.  There could even be a preexisting Java library that already performs the function, so that part of the work could already be done, and all it needs is the Appian plugin treatment.

    One note, though, if you do build it yourself.  I would highly recommend that you receive your number that you want to convert to words as text, and process the text to get your result.  That will help to ensure you get consistent results without any funny business around scientific notation or other things that can happen to numbers as numbers.

  • 0
    Certified Lead Developer
    in reply to Dave Lewis
    I created an Appian based rule that does the same thing, only it handled all numbers all the way up to nine hundred and ninety-nine centillion

    I'd love to see that.  Are you in a position to share?  Maybe OP could take a crack at translating that instead of trying to mess around with the plug-in?

  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    I used a forEach to take the three characters off the right side of the number, process those with a helper rule to get words like "six hundred and fifty-seven" or "twelve", then concatenated the string at the index of the forEach from a constant list of strings, containing all the number powers of 1000, thousand, million, billion, trillion, etc.  I also had to include an escape if case if all three digits were 0, whereby I'd skip to the next. So you could have nine billion and five.  I don't remember if I managed rules for how to determine when to use the word "and".  I went from the right side of the number, so I'd process them correctly regardless of how many digits I had.  I'd do it completely wrong 12 billion vs. 120 billion if I started from the left.

    That left me with a backwards array, so I had to wrap the whole thing in an invert function, and wrap that in a joinarray function, which had the helpful benefit of allowing me to add the commas.

    This was for a hackathon that I threw away.

    My new favorite number, aside from phi, is one septuagintillion.  1 followed by 213 zeroes.

Reply
  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    I used a forEach to take the three characters off the right side of the number, process those with a helper rule to get words like "six hundred and fifty-seven" or "twelve", then concatenated the string at the index of the forEach from a constant list of strings, containing all the number powers of 1000, thousand, million, billion, trillion, etc.  I also had to include an escape if case if all three digits were 0, whereby I'd skip to the next. So you could have nine billion and five.  I don't remember if I managed rules for how to determine when to use the word "and".  I went from the right side of the number, so I'd process them correctly regardless of how many digits I had.  I'd do it completely wrong 12 billion vs. 120 billion if I started from the left.

    That left me with a backwards array, so I had to wrap the whole thing in an invert function, and wrap that in a joinarray function, which had the helpful benefit of allowing me to add the commas.

    This was for a hackathon that I threw away.

    My new favorite number, aside from phi, is one septuagintillion.  1 followed by 213 zeroes.

Children
No Data