ngx-localized-router 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
1
|
# ngx-localized-router
|
|
2
2
|
|
|
3
|
-
tbd...
|
|
3
|
+
tbd...
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
In your app config:
|
|
7
|
+
|
|
8
|
+
```typescript
|
|
9
|
+
provideNgxLocalizedRouter({
|
|
10
|
+
defaultLanguage: 'de',
|
|
11
|
+
languages: ['en', 'de'],
|
|
12
|
+
languageResolved: (language: string) => {
|
|
13
|
+
// Load translations, set app language etc...
|
|
14
|
+
},
|
|
15
|
+
}),
|
|
16
|
+
provideRouter(localizeRoutes(appRoutes))
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Url localization:
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<a class="nav__item" [routerLink]="'/some-route' | localizeRoute:'en'">Label</a>
|
|
23
|
+
```
|
package/package.json
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
"Router",
|
|
8
8
|
"Translate router"
|
|
9
9
|
],
|
|
10
|
-
"version": "0.0.
|
|
10
|
+
"version": "0.0.3",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"@angular/common": "
|
|
14
|
-
"@angular/core": "
|
|
13
|
+
"@angular/common": ">=20.0.0",
|
|
14
|
+
"@angular/core": ">=21.0.0"
|
|
15
15
|
},
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/odomanskyi/ngx-localized-router/issues"
|