VladFD That function has nothing to do with what you want to achieve. But you could write a function that does what you want fairly easy.
If your value is equal or bigger than a million get the number of millions and append "million" or "millions".
Example: 3,435,565 --> create the string "3" + " millions"
If it's not equal or bigger than a million do the same check for thousands.