@studiohyperdrive/ngx-i18n
Advanced tools
Comparing version 17.1.0 to 18.0.0
{ | ||
"name": "@studiohyperdrive/ngx-i18n", | ||
"version": "17.1.0", | ||
"version": "18.0.0", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"@angular/common": "^17.0.4", | ||
"@angular/core": "^17.0.4", | ||
"@ngx-translate/core": "^14.0.0", | ||
"@angular/common": "^18.0.2", | ||
"@angular/core": "^18.0.2", | ||
"@ngx-translate/core": "^15.0.0", | ||
"angular2-uuid": "^1.1.1", | ||
"deepmerge-ts": "^4.2.2" | ||
"deepmerge-ts": "^7.0.3" | ||
}, | ||
@@ -12,0 +12,0 @@ "dependencies": { |
@@ -1,3 +0,7 @@ | ||
# Angular Tools: NgxI18nModule (`@studiohyperdrive/ngx-i18n`) | ||
# Angular Tools: NgxI18n (`@studiohyperdrive/ngx-i18n`) | ||
This library provides a lazy-loaded modular approach to translations. | ||
## Installation | ||
Install the package first: | ||
@@ -9,4 +13,14 @@ | ||
## 1. Concept | ||
## Versioning and build information | ||
This package will follow a semver-like format, `major.minor.patch`, in which: | ||
- `major`: Follows the Angular major version | ||
- `minor`: Introduces new features and (potential) breaking changes | ||
- `patch`: Introduces bugfixes and minor non-breaking changes | ||
For more information about the build process, authors, contributions and issues, we refer to the [ngx-tools](https://github.com/studiohyperdrive/ngx-tools) repository. | ||
## Concept | ||
`ngx-1i8n` is a layer on top of `ngx-translate` that allows for a lazy-loaded modular approach to translations. This approach allows the user to split up the translations into several independent files, which can be lazy-loaded whenever they're needed. | ||
@@ -16,3 +30,3 @@ | ||
## 2. Modular | ||
### Modular | ||
@@ -33,3 +47,3 @@ In order for a modular translation system, we provide a `TranslationLoader` to each `forChild` method of the `NgxI18nModule`. This loader uses a similar approach as @rbalet's [MultiTranslateHttpLoader](https://github.com/rbalet/ngx-translate-multi-http-loader). | ||
## 3. Lazy-loaded | ||
### Lazy-loaded | ||
@@ -42,4 +56,6 @@ In order to provide a lazy loaded translation system, the translations only get loaded when routing to a specific route. | ||
## 4. I18nGuard | ||
## Implementation | ||
### I18nGuard | ||
The `@studiohyperdrive/ngx-i18n` package also provides us with a `I18nGuard` which will automatically prefix the routes of your application with a language parameter. | ||
@@ -49,3 +65,3 @@ | ||
## 5. Setup | ||
### Setup | ||
@@ -106,21 +122,17 @@ In this simple example we'll provide the basic setup for the `NgxI18nModule` approach. | ||
## build information | ||
### Standalone | ||
This project has been build with: | ||
`ngx-i18n` also works with stand-alone components. In order to provide translations as done using modules, we use the `provideWithTranslations` function. Wrapping a `Route` with this function will provide the translations for said route. | ||
- Angular CLI : `16.1.4` | ||
- Angular: `16.1.5` | ||
- nodejs: `18.17.0` | ||
- npm: `9.6.7` | ||
For a complete list of packages and version check out the `package.json` file. | ||
## Team | ||
This bundle of tools has been created and is maintained by [Studio Hyperdrive](https://studiohyperdrive.be). | ||
Contributors: | ||
- [Denis Valcke](https://github.com/DenisValcke) | ||
- [Iben Van de Veire](https://github.com/IbenTesara) | ||
- [Wouter Heirstrate](https://github.com/WHeirstrate) | ||
```ts | ||
export const TestRoutes: Routes = [ | ||
provideWithTranslations( | ||
{ | ||
path: '', | ||
component: TestComponent | ||
canActivate: [TranslationLoaderGuard], | ||
}, | ||
TestTranslationLoader | ||
) | ||
]; | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
131407
133