Skip to content

Commit 89c43fd

Browse files
committed
Update README.md - add instructions on how to use translation hook
1 parent 1d77604 commit 89c43fd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@ There is also async overload:
4949
await Notifications.SendAsync("Warning!", NotificationType.Warning);
5050
```
5151

52+
You can also hook Translation / any fuction to handle messages before sending like so:
53+
```c#
54+
private void Start()
55+
{
56+
Notifications.TranslationFunction = Translate;
57+
}
58+
59+
private string Translate(string key)
60+
{
61+
// Do something.
62+
return key;
63+
}
64+
```
65+
5266
## Install
5367

5468
### via npm

0 commit comments

Comments
 (0)