Handling other representation of numerical values


#1

I am looking for a way to handle numerical values in a non US format. I need to replace values like 1,024.45 by 1 024,45 .

Is there any recent library or ember pattern to handle that ?


#2

ember-intl supports also localization of numbers. There is also a port of accounting.js to ember: ember-cli-accounting For other addons have a look at emberobserver.com. If you don’t have to support i18n but only need a way to format a number in a nice way, you could wirte your own template helper. Wouldn’t be to much code.


#3

I’ll look into enber-intl. Thanks.


#4

I need to be able to take users input in their local and then convert it back to JS number. it does not seems ember-intl support that.


#5

I think what you’re looking for is what Sam did in this video for SSN formatting: https://embermap.com/video/input-helper-vs-data-down-actions-up