Zahhar Posted January 27, 2005 Report Posted January 27, 2005 Hello, guys! I have a problem I can't solve myself. I am web-developer from Estonia and I need to implement an algorithm for converting a random numeric to correct latvian words. You know, this is needed for printed accounts for example. Can you give me proper php-function or class to convert i.e. "53.10" to "Piecdesmit trīs lati 10 santīmi"? I have found this script on your site, but seems it is not correct. If I convert "23123.23" I get "desmit tukstosi simti desmit lati desmit santimi", wich definilty not right. I would be very thankful if you help me! P.S. PHP::PEAR repository has class named Number2Words with english, russian, estonian, lithuanian and others language support. It would be good if your community add there Latvian language support as well!
Venom Posted January 28, 2005 Report Posted January 28, 2005 here you go http://paste.php.lv/1587 it returns santimes in an accounting matter - 2 numbers followed by santīmi/s, though works ok to 1000nds of billions
Zahhar Posted February 2, 2005 Author Report Posted February 2, 2005 Thank you very much, you helped me a lot!
Venom Posted August 8, 2005 Report Posted August 8, 2005 angliski, angliski (: laikam kautkur bija izlabota versija
superKrona Posted September 4, 2007 Report Posted September 4, 2007 Pielaboju rakstību skaitļiem x0 un x1: http://paste.php.lv/6009
superKrona Posted September 5, 2007 Report Posted September 5, 2007 (edited) Gramatika, gramatika. Es domāju lats, lati Tagad arī paši skaitļi rakstās pareizi: simts->simti; tūkstotis->tūkstoši utt. arī santīms->santīmi http://paste.php.lv/6019 Edited September 5, 2007 by superKrona
Andrew Posted December 4, 2007 Report Posted December 4, 2007 Sveiki! Sastapos ar nelielu problēmu skirptā. Mēģinam uzrakstīt vārdiem nenoapaļotu summu 4.999: četri lati un 100 santīmi :)
superKrona Posted December 4, 2007 Report Posted December 4, 2007 Nu noapaļo, pirms nolasi http://paste.php.lv/6521
brachux Posted February 24, 2009 Report Posted February 24, 2009 Nu noapaļo, pirms nolasihttp://paste.php.lv/6521 kāds nevarētu palabot šo kodu, lai darbotos pie summām zem 1Ls un arī ar 0Ls.. būtu ļoti pateicīgs ;)
superKrona Posted February 17, 2010 Report Posted February 17, 2010 Lai darbojies pie summām zem 1Ls un arī ar 0Ls! http://paste.php.lv/b99a473bd15ae69e27cc94ad18d515f4?lang=php
2easy Posted February 17, 2010 Report Posted February 17, 2010 neesmu testējis, bet izskatās, ka šo varētu likt pie noderīgām funkcijām http://php.lv/f/topic/15423-noderigas-funkcijas/
Recommended Posts