Skip to Main Content
  • Questions
  • Spanish trasnlation for amount in words

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Prashant.

Asked: October 27, 2016 - 4:31 pm UTC

Last updated: October 29, 2016 - 6:28 am UTC

Version: 11.2

Viewed 1000+ times

You Asked

Hi Tom,

I have a requirement by a client that the amount in number currently prnting on checks needs to be converted to spanish,

ex

one hundred us dollars should be printed as cien dólares americanos

Could you please suggest how can we acheive this?

and Chris said...

There isn't a built-in way to translate text in Oracle Database.

This method does a call out to babelfish to translate text:

http://osify.com/2012/05/oracle-plsql-function-to-spelling-number-to-other-language-automatic/

But you'll need to give your database internet access to do this. Which is generally a bad idea.

So you'll need to find something else to do the translation or do it manually.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

To Prashant...

J. Laurindo Chiappa, October 28, 2016 - 3:46 pm UTC

Prashant, the answer is absolutely correct, there is no native way to spell in words a number value for another languages to an Oracle database, you will need to write something.... Two main possibilities exist for this :

a) via character functions or calculations find the decimal, hundreds, thousands, etc, for the number and inside a nest of IFs append the correct words in a string : for example, http://www.orafaq.com/node/1448 do this for Indian numeric system, http://www.profissionaloracle.com.br/gpo/artigo/programacao/470-numero-por-extenso-monetario-e-calculo-de-formulas-matematicas-no-oracle and http://lib.seven.com.br/imprimir_artigo.asp?codartigo=976 do the same for Portuguese numeric system (I did things like this many times in Brazilian customers)... You could take one of these as a basis, translating the number grouping names to Spanish

OR

b) use the JSP trick : since a long time, the JSP format mask in some Oracle convertion built-ins give to you a number value spelled in words (but in Englis only) : you cold use this and just replace the English number grouping names to Spanish, https://community.oracle.com/message/454870#454870 does Exactly That...
This would be the easier option, I think...

Regards,

J. Laurindo Chiappa
Connor McDonald
October 29, 2016 - 6:28 am UTC

nice input, thanks