svelte-i18n icon indicating copy to clipboard operation
svelte-i18n copied to clipboard

Parse locale string to number (question)

Open esoteloferry opened this issue 3 years ago • 0 comments

Hi,

This is a question , not a bug, sorry to post it here but could not find where to.

Great library! , starting to use it.

I want to convert a string locale to number, f.e.: es-ES "1.000,2" -> "1000.2" "2,3e3" -> "2300"

Because the input for $number formater is a number. Is there a way to do this with svelte-i18n?. I was searching around and looks like I have to use another library to parse it , do you have any recommendations?

Thanks in advance!

esoteloferry avatar Nov 21 '21 00:11 esoteloferry