core

The internationalization (i18n) library for Angular

MIT License

Downloads
719
Stars
4.5K
Committers
107

Bot releases are hidden (Show)

core - v2.4.3

Published by ocombe about 8 years ago

<a name"2.4.3">

2.4.3 (2016-09-01)

Bug Fixes

  • npm: update to angular 2 RC6 & switch to webpack for tests (3ada3c1c, closes #219, #129)
core - v2.4.2

Published by ocombe about 8 years ago

<a name"2.4.2">

2.4.2 (2016-08-20)

Bug Fixes

  • TranslateService: addLangs should append langs, not replace them (98bb4302)
core - v2.4.1

Published by ocombe about 8 years ago

<a name"2.4.1">

2.4.1 (2016-08-13)

Bug Fixes

  • TranslateService: removed undefined type (TS 2.0 only) (8cba1ca3)
core - v2.4.0

Published by ocombe about 8 years ago

<a name"2.4.0">

2.4.0 (2016-08-13)

Bug Fixes

  • TranslateService: set currentLang immediately at first use (7dceb343, closes #181)

Features

  • TranslateService:
    • adding new getBrowserLang method (e24bfa42)
    • added new OnTranslationChange event (7ddc0dab)
    • added a new addLangs method (655c6075)
    • added new merging option when setting translations (4a8fb83c)
core - v2.3.1

Published by ocombe about 8 years ago

<a name"2.3.1">

2.3.1 (2016-08-12)

Bug Fixes

  • npm: revert to typescript 1.8.10 from 2.0 to avoid typings issues (822edd63)
core - v2.3.0

Published by ocombe about 8 years ago

<a name"2.3.0">

2.3.0 (2016-08-12)

Features

  • ng2-translate: update to Angular 2 RC5 and the new NgModule (88d9fafa)
core - v2.2.2

Published by ocombe over 8 years ago

<a name"2.2.2">

2.2.2 (2016-06-22)

Bug Fixes

  • TranslatePipe: Don't subscribe multiple times to lang change event (a95e5854, closes #139)
  • TranslateService: Remove Http dependency from the TranslateService class (7c562767, closes #149)
  • TranslateParser: Fixed target undefined for missing translation (e96d9a56, closes #87)
core - v2.2.1

Published by ocombe over 8 years ago

<a name"2.2.1">

2.2.1 (2016-06-22)

Bug Fixes

  • npm: update to angular 2 RC 3 (0bbb8fc8)
core - v2.2.0

Published by ocombe over 8 years ago

<a name"2.2.0">

2.2.0 (2016-06-16)

Features

core - v2.1.0

Published by ocombe over 8 years ago

<a name"2.1.0">

2.1.0 (2016-05-09)

Features

core - v2.0.0

Published by ocombe over 8 years ago

<a name"2.0.0">

2.0.0 (2016-04-27)

Bug Fixes

  • npm: update angular 2 peer dependency (38ec3f1a)

Breaking Changes

  • the lib now only works with beta >=16 because of a change in pipe arguments
    (38ec3f1a)
core - v1.11.3

Published by ocombe over 8 years ago

<a name"1.11.3">

1.11.3 (2016-04-26)

Bug Fixes

  • Parser: accept falsy values (3fb23352)
core - v1.11.2

Published by ocombe over 8 years ago

<a name"1.11.2">

1.11.2 (2016-04-26)

Bug Fixes

core - v1.11.1

Published by ocombe over 8 years ago

<a name"1.11.1">

1.11.1 (2016-04-15)

Bug Fixes

  • npm: Updated to beta 15 & removed most peer dependencies (60786305)
core - v1.11.0

Published by ocombe over 8 years ago

<a name"1.11.0">

1.11.0 (2016-03-29)

Bug Fixes

  • TranslateParser: allow keys with dots along with subkeys (692dccc0, closes #56)
  • TranslateService:
    • removed deprecated RxJS fromArray (4b78732e, closes #76)
  • npm:
    • updated minimal version of angular 2 to beta 10 (b74dc347, closes #74)
    • update to angular2-beta.12 (0fdb2bea)

Features

  • TranslateService: allow user to reload lang (475a1a97, closes #65)

BREAKING CHANGES:

Because of recent changes we have to use RxJS >= beta 2 and that means a recent version of Angular 2. You now have to upgrade to Angular beta 10 or more to use ng2-translate.

core - v1.10.3

Published by ocombe over 8 years ago

<a name"1.10.3">

1.10.3 (2016-03-20)

Bug Fixes

  • TranslateParser: allow keys with dots along with subkeys (82001278, closes #56)
  • TranslatePipe: more robust when keys are falsy (28eda375)
  • npm: update to angular2-beta.11 (13eea254)
core - v1.10.2

Published by ocombe over 8 years ago

<a name"1.10.2">

1.10.2 (2016-03-18)

Bug Fixes

  • npm: support for angular2-beta.10 (1d55159f, closes #67)
core - v1.10.1

Published by ocombe over 8 years ago

<a name"1.10.1">

1.10.1 (2016-03-15)

Bug Fixes

  • TranslatePipe: call markForChanges when the pipe updates a value (591ee4d5, closes #33)
  • parser: accept dots in json keys (7bcd6f5f, closes #53)
core - v1.10.0

Published by ocombe over 8 years ago

<a name"1.10.0">

1.10.0 (2016-03-06)

Features

  • MissingTranslationHandler: the MissingTranslationHandler is now able to return a value or an o (23267b13)
  • TranslateService: onLangChange now returns a LangChangeEvent instead of an object (e3087ac7)

BREAKING CHANGES:

The methods setMissingTranslationHandler, useLoader and useStaticFilesLoader have been removed. It was not a good practice to change these after DI. You should use provide instead, during bootstrap or in the providers property of your component.

If you don't need to change anything to the default configuration just use TRANSLATE_PROVIDERS:

import {HTTP_PROVIDERS} from 'angular2/http';
import {TRANSLATE_PROVIDERS} from 'ng2-translate/ng2-translate';
import {bootstrap} from 'angular2/platform/browser';

bootstrap(AppComponent, [
    HTTP_PROVIDERS,
    TRANSLATE_PROVIDERS
]);

If you need extra customisation you should use provide:

import {provide} from 'angular2/core';
import {HTTP_PROVIDERS} from 'angular2/http';
import {TranslateLoader, TranslateStaticLoader, TranslateService} from 'ng2-translate/ng2-translate';
import {bootstrap} from 'angular2/platform/browser';

bootstrap(AppComponent, [
    HTTP_PROVIDERS,
    provide(TranslateLoader, {
        useFactory: (http: Http) => new TranslateStaticLoader(http, 'assets/i18n', '.json'),
        deps: [Http]
    }),
    // use TranslateService here, and not TRANSLATE_PROVIDERS (which will define a default TranslateStaticLoader)
    TranslateService
]);

You can also use provide to define this at a component level, just add it to the providers property of your application.

If you use Ionic 2, you can customize the service like this:

import {provide} from 'angular2/core';
import {TranslateService, TranslateLoader, TranslateStaticLoader} from 'ng2-translate/ng2-translate';

@App({
  templateUrl: '....',
  config: {},
  providers: [
    provide(TranslateLoader, {
      useFactory: (http: Http) => new TranslateStaticLoader(http, 'assets/i18n', '.json'),
      deps: [Http]
    }),
    TranslateService
  ]
});
core - v1.9.0

Published by ocombe over 8 years ago

<a name"1.9.0">

1.9.0 (2016-03-06)

Bug Fixes

  • TranslateParser: parser.flattenObject is called too often (f01ee793, closes #47)

Features

  • Translate: adding TRANSLATE_PROVIDERS for DI (5da101dd, closes #48, closes #46)
Package Rankings
Top 9.12% on Proxy.golang.org
Top 18.54% on Repo1.maven.org
Top 5.45% on Npmjs.org
Badges
Extracted from project README
npm version