Updated formatLocalized to be more OS independent

It would be great if the user won't need to check whether to use the %e modifier or the %#d modifier.