Skip to content

01. Description

Piotr B edited this page Jan 21, 2022 · 1 revision

General

Slownie package is a set of classes meant to transcribe currency values into it's wordly form. It supports every ISO4217-defined currency (by 2022-01-19) and allows translation to German, English and Polish languages. The package has no requirements other than PHP ^7.3

Namespace

  • tei187
    • Slownie
      • Currency (class handling proper signing of set currency)
      • DE (German translation handler)
      • EN (English translation handler)
      • PL (Polish translation handler)
      • Slownie (abstract class for translation handlers)
    • Resources
      • DE (translation of numbers in German)
      • EN (translation of numbers in English)
      • PL (translation of numbers in Polish)
      • ISO4217
        • DE (translation of currencies in German)
        • EN (translation of currencies in English)
        • PL (translation of currencies in Polish)
        • Xref (cross-reference table between digit and char ISO4217 codes)

Why?

I've noticed that the required "words" transcription was often botched in order documents that went through my desk, so for example $150.000 got transcribed as "one hundred fifty dollars" which is of course incorrect. It is hardly a big deal, definately something that isn't a huge problem when it comes to legislature, but generally seemed very unprofessional. As such, it deemed necessary to create a script that would automatically translate currency values into correct words form in few select languages. As such, this. :)

Further reading

Clone this wiki locally