@tolgee/ngx 1.7.4 → 1.8.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 +50 -13
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
|
+

|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
[](https://github.com/tolgee/tolgee-js)
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
# Tolgee for Angular
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
10
|
+
[<img src="https://raw.githubusercontent.com/tolgee/documentation/main/tolgee_logo_text.svg" alt="Tolgee" width="200" />](https://tolgee.io)
|
|
11
|
+
|
|
12
|
+
Lokalize (translate) your Angular app to multiple languages with Tolgee. For more information about using Tolgee with
|
|
13
|
+
angular, visit our [documentation website](https://toolkit.tolgee.io/docs/web/using_with_angular/installation).
|
|
14
|
+
Integration of Tolgee is extremely simple! 🇯🇵 🇰🇷 🇩🇪 🇨🇳 🇺🇸 🇫🇷 🇪🇸 🇮🇹 🇷🇺 🇬🇧
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- All in One localization solution for your JS application 🙌
|
|
19
|
+
- Out of box in-context localization 🎉
|
|
20
|
+
- Automated screenshot generation 📷
|
|
21
|
+
- Translation management platform 🎈
|
|
22
|
+
- Open-source 🔥
|
|
7
23
|
|
|
8
24
|
## Installation
|
|
9
25
|
|
|
@@ -14,9 +30,9 @@ First, install the package.
|
|
|
14
30
|
Then import `NgxTolgeeModule` in your app.
|
|
15
31
|
|
|
16
32
|
```typescript
|
|
17
|
-
import {NgxTolgeeModule} from "
|
|
18
|
-
import {UI} from "@tolgee/ui";
|
|
19
|
-
import {NgModule} from '@angular/core';
|
|
33
|
+
import { NgxTolgeeModule } from "@tolgee/ngx";
|
|
34
|
+
import { UI } from "@tolgee/ui";
|
|
35
|
+
import { NgModule } from '@angular/core';
|
|
20
36
|
import { environment } from '../environments/environment';
|
|
21
37
|
|
|
22
38
|
|
|
@@ -26,21 +42,24 @@ import { environment } from '../environments/environment';
|
|
|
26
42
|
],
|
|
27
43
|
imports: [
|
|
28
44
|
...,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
...,
|
|
45
|
+
NgxTolgeeModule.forRoot({
|
|
46
|
+
apiUrl: environment.tolgeeApiUrl,
|
|
47
|
+
apiKey: environment.tolgeeApiKey,
|
|
48
|
+
ui: UI
|
|
49
|
+
}),
|
|
50
|
+
...,
|
|
35
51
|
],
|
|
36
52
|
...,
|
|
37
53
|
})
|
|
54
|
+
|
|
38
55
|
export class AppModule {
|
|
39
56
|
}
|
|
40
57
|
```
|
|
41
58
|
|
|
42
59
|
## Usage
|
|
43
60
|
|
|
61
|
+

|
|
62
|
+
|
|
44
63
|
### Using pipe
|
|
45
64
|
|
|
46
65
|
```angular2html
|
|
@@ -54,3 +73,21 @@ this.translateService
|
|
|
54
73
|
.get('hello_world')
|
|
55
74
|
.subscribe((r) => (this.helloWorld = r));
|
|
56
75
|
```
|
|
76
|
+
|
|
77
|
+
### Element with t attribute
|
|
78
|
+
|
|
79
|
+
```html
|
|
80
|
+
<h1 t key="providing_default_values"></h1>
|
|
81
|
+
<p t key="Peter has n dogs" [params]="params"></p>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Prerequisites
|
|
85
|
+
|
|
86
|
+
1. You have some React based project
|
|
87
|
+
2. You have generated API key from [Tolgee Cloud](https://app.tolgee.io) or self-hosted Tolgee instance.
|
|
88
|
+
|
|
89
|
+
## Quick integration guide
|
|
90
|
+
|
|
91
|
+

|
|
92
|
+
Learn more at our [documentation website 📖](https://tolgee.io).
|
|
93
|
+
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tolgee/ngx",
|
|
3
3
|
"description": "Angular integration of Tolgee localization tool",
|
|
4
|
-
"
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/tolgee/tolgee-js"
|
|
7
|
+
},
|
|
8
|
+
"version": "1.8.3",
|
|
5
9
|
"publishConfig": {
|
|
6
10
|
"directory": "../../dist/ngx-tolgee",
|
|
7
11
|
"access": "public"
|