Packages were moved to the jsverse scope, the versioning continues from the last version of the previous scope.
- The package is now published under the
@jsverse
scope. - The transpiler matching algorithm has changed, see this key referencing discussion.
- The transpiler
transpile
method signature has changed to an object. setTranslationKey
method signature has changed, thelang
parameter was moved to the config.
- The package is now published under the
@jsverse
scope and aligned to the main package major version (v7). - Updated the transpile method usages.
- Minimum Transloco version is now
^7.0.0
.
- The package is now published under the
@jsverse
scope and aligned to the main package major version (v7).
- The package is now published under the
@jsverse
scope and aligned to the main package major version (v7).
- The package is now published under the
@jsverse
scope and aligned to the main package major version (v7).
- The package is now published under the
@jsverse
scope and aligned to the main package major version (v7).
- The package is now published under the
@jsverse
scope and aligned to the main package major version (v7).
- The package is now published under the
@jsverse
scope and aligned to the main package major version (v7).
- The package is now published under the
@jsverse
scope and aligned to the main package major version (v7).
- The package is now published under the
@jsverse
scope and aligned to the main package major version (v7).
Versions 5.0.8-10 also contains the breaking change in V6 but accidentally weren't marked correctly.
- Update
flat
package to v6 which is ESM
V5 was focused on a major infra upgrade to improve Transloco's maintainability also moving to new Angular features. please take a look at the following:
@angular/core
peer dependency is now>=v16
TRANSLOCO_SCOPE
is now always provided as multi.- Remove
PersistStorage
type. - Pipes, directives and components are now standalone.
- Removed
forRoot
fromTranslocoModule
, useprovideTransloco
and other provider functions.
@angular/core
peer dependency is now>=v16
- Pipes, directives and components are now standalone.
- Injection tokens are now prefixed with
TRANSLOCO_
- Removed
forRoot
fromTranslocoLocaleModule
, useprovideTranslocoLocale
and other provider functions.
@angular/core
peer dependency is now>=v16
- Removed
TranslocoMessageFormatModule
, useprovideTranslocoMessageformat
.
@angular/core
peer dependency is now>=v16
- Removed
TranslocoPersistLangModule
, useprovideTranslocoPersistLang
.
@angular/core
peer dependency is now>=v16
- Removed
TranslocoPersistTranslationsModule
, useprovideTranslocoPersistTranslations
.
@angular/core
peer dependency is now>=v16
- Removed
TranslocoPreloadLangsModule
, useprovideTranslocoPreloadLangs
.
Other packages were bumped to keep alignment.
Transloco now requires @angular/core
v13 and above:
@angular/core
peer dependency is now>=v13
@angular/core
peer dependency is now>=v13
@angular/core
peer dependency is now>=v13
@angular/core
peer dependency is now>=v13
@angular/core
peer dependency is now>=v13
@angular/core
peer dependency is now>=v13
Other packages were bumped to keep alignment.
V3 was focused on a major infra upgrade to improve Transloco's maintainability and the ability to create new features easily. We have removed deprecated code and upgraded dependencies, please take a look at the following:
@angular/core
peer dependency is now>=v12
- Removed
scopeMapping
property from theTranslocoConfig
, define the alias on the scope provider instead. - Removed
provideTranslocoConfig
function. - LoadedEvent - removed
lang
property. TranslocoTestingModule
removedwithLangs
method, useforRoot
instead.
@angular/core
peer dependency is now>=v12
TranslocoLocaleModule
removedinit
method, useforRoot
instead.
@angular/core
peer dependency is now>=v12
- Upgraded
messageformat
from v2.3.0 to@messageformat/core
v3.0.0, see changelog for more information. TranslocoMessageFormatModule
removedinit
method, useforRoot
instead.
- Messageformat compiled messages are now cached by default see #358 & messageformat caching. Thank goes to k3nsei.
@angular/core
peer dependency is now>=v12
TranslocoPersistLangModule
removedinit
method, useforRoot
instead.
@angular/core
peer dependency is now>=v12
TranslocoPersistTranslationsModule
removedinit
method, useforRoot
instead.
@angular/core
peer dependency is now>=v12
TranslocoPreloadLangsModule
removedpreload
method, useforRoot
instead.
- Structural directive is now a memoized function:
// before {{ t.a.b }} {{ t.hello }} {{ t.someKey | translocoParams: { value: 'value' } }}
After:
{{ t('a.b') }} {{ t('hello') }} {{ t('someKey', { value: 'value' }) }}
- Dedicated method for when you need to query an object instead of a key:
// Before
service.translate('a.b', params);
service.selectTranslate('a.b', params);
// After
service.translateObject('a.b', params);
service.selectTranslateObject('a.b', params);
MissingHandler
interface: removes the second redundantparams
param. (only relevant if you implemented a custom handler)
We also made minor changes in TranslocoConfig
:
- It's now required to set the available languages in your application:
- We have changed the
listenToLangChange
flag to a more clearreRenderOnLangChange
:
{
provide: TRANSLOCO_CONFIG,
useValue: {
availableLangs: ['en', 'es'],
reRenderOnLangChange: true
}
}
We also allow passing an object
making it easier for you to use it in a languages dropdown:
[{ id: 'en', label: 'English'}]
We need this information to know whether we're dealing with a language
or a scope
.
- Change
config.listenToLangChange
toconfig.reRenderOnLangChange
to make it more clear. - Remove callback param support from
translate()
. - Remove messageformat from the library in favor of the external library.
We created a schematics command that'll do most of the work for you
For more information see the schematics upgrade command
- Each translation file is now flatten in runtime. This change brings benefits such as lower memory consumption, and faster value accessor.
- Missing handler support for the structural directive.
- Transloco optimizes library which will minify the translation files, flatten AOT, and removes comments.
- Support a fallback language for missing translation value or key.
- Set a scope alias directly in
TRANSLOCO_SCOPE
.
A Transloco CLI tool that builds the translation files based on your code in development. Inform you about missing keys and extras. Stay tuned.