Giter Club home page Giter Club logo

ember-intl's Introduction

ember-intl

npm Version Ember Version Build Status npm Ember Observer Score

Notable Features

  • ๐Ÿ’ต Locale-aware numbers. Formatting of currencies, decimals, and percentages
  • ๐Ÿ“… Locale-aware dates and times formatting
  • ๐Ÿ•‘ Locale-aware display of relative time. i.e, "in 1 day", "2 years ago", etc.
  • ๐Ÿ’ฌ ICU Message Syntax. Pluralization and formatted segments (numbers, datetime, etc.)
  • ๐ŸŒ Support for 150+ languages
  • ๐Ÿ•ต๐Ÿป Translation linting (detects missing translations & translation argument mismatches)
  • ๐Ÿ“œ Built largely on standards. ICU message syntax & Native Intl API
  • โšก Extensive Ember Service API and template helpers for formatting and translating
  • ๐ŸŽ‰ Advanced addon support to provide translations to the host app

Documentation

5.x

4.x (legacy)

Migrating from 4.x to 5.x

Notable Changes

  • Polyfills have been removed entirely and with it the need to bundle the pluralization rules as they now come from the native Intl.PluralRules API
  • Translations are now placed in a fixed location when bundled, no longer need to traverse the private API requirejs._eak_seen to hydrate the service with translations
  • Intl.MessageFormat parser and compiler updated which changes how text and tags are escaped

Breaking Changes

  • Node 8 support dropped
  • Intl.RelativeTime polyfill has been replaced with the native API which behaves entirely different than the previous older spec implementation (read about in the Migration Document)
  • Translations are now escaped differently (read about in the Migration Document)
  • Removes shortNumber formatting in favor of now supported native implementation using the "notation" property i.e.,
this.intl.formatNumber(1000, {
  notation: "compact" ,
  compactDisplay: "short"
}); // -> 1k

When you're ready to upgrade, head over to the Migration Document to read more in detail about what changed.

All of this will result in smaller bundles, faster build times, and less work done on app boot.

Migrating from ember-i18n

There's an ember-i18n-to-intl-migrator tool that is used to convert your translations files and application code to ember-intl.

If you have any questions or issues, please open in ember-i18n-to-intl-migrator/issues

ember-intl's People

Contributors

adamacus avatar briarsweetbriar avatar buschtoens avatar cibernox avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar elwayman02 avatar greatwizard avatar greenkeeper[bot] avatar jasonmit avatar jlami avatar jlecomte avatar jrjohnson avatar k-fish avatar kalenjio avatar kturney avatar makepanic avatar mdehoog avatar rlivsey avatar sandstrom avatar sly7-7 avatar snewcomer avatar stefanpenner avatar thoov avatar turbo87 avatar vvohra avatar yito-nta avatar ykaragol avatar zeppelin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.