You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docusaurus/docs/Angular/concepts/translation.mdx
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,12 +25,12 @@ export class AppModule {}
25
25
```
26
26
27
27
:::important
28
-
You should import the `TranslateModule.forRoot()` in a non-lazy loaded module (even if the chat application is displayed from a lazy loaded module).
28
+
You should import the `TranslateModule.forRoot()` in a non-lazy loaded module (for example `AppModule`) even if the chat application is displayed from a lazy loaded module. If the translation isn't initialized properly the UI labels will be displayed as "streamChat...".
29
29
:::
30
30
31
31
### Set up the translations
32
32
33
-
Typically you will be doing it in your `AppComponent`:
33
+
Initialize the translation in the **constructor** of the component which displays the chat UI (for example `AppComponent`)
It's important to call the `setTranslation` in the constructor of the component that displays the chat UI. If the translation isn't initialized properly the UI labels will be displayed as "streamChat...".
45
+
:::
46
+
43
47
## Setup, if you're using ngx-translate in your project
0 commit comments