Skip to content

This addon provides internationalization helpers for Ember templates and components.

License

Notifications You must be signed in to change notification settings

robert-allan-frank/ember-intl-fns

Repository files navigation

ember-intl-fns npm version Build Status codecov

This addon provides internationalization helpers for Ember templates and components.

To install:

ember install ember-intl-fns

Usage

intl-date-time-format

Provides language-sensitive date time formatting. See Intl.DateTimeFormat.format() for details on the Intl.DateTimeFormat.format() function.

{{intl-date-time-format locale value (hash 
  "localeMatcher"="best fit" 
  "year"="numeric"
  "month"="long"
  "day"="numeric",
  "hour"="numeric",
  "minute"="numeric",
  "second"="numeric",
  "hour12"=true)
}}

intl-number-format

Provides language-sensitive number formatting. See Intl.Number.format() for details on the Intl.Number.format() function.

{{intl-number-format locale value (hash 
  "localeMatcher"="best fit" 
  "style"="decimal",
  "useGrouping"=true,
  "minimumIntegerDigits"=1,
  "minimumFractionDigits"=2,
  "maximumFractionDigits"=4)
}}

intl-relative-time-format

Provides language-sensitive relative time formatting. See Intl.RelativeTimeFormat.format() for details on the Intl.RelativeTimeFormat.format() function. Note, currently in Stage 3 and not supported by Edge, IE, Safari, and Safari IOS although will downgrade gracefully.

{{intl-relative-time-format locale value unit (hash 
  "localeMatcher"="best fit" 
  "numeric"="always" 
  "style"="long")
}}

Related Addons

Compatibility

  • Ember.js v3.4 or above
  • Ember CLI v2.13 or above
  • Node.js v8 or above

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

About

This addon provides internationalization helpers for Ember templates and components.

Resources

License

Stars

Watchers

Forks

Packages

No packages published