Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: react native docs #1506

Merged
merged 19 commits into from
May 4, 2023
1 change: 1 addition & 0 deletions website/docs/misc/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@

- [Let React speak your language](https://www.youtube.com/watch?v=soAEB7ltQPk) - by Tomáš Ehrlich
- [Internationalization is a piece of cake](https://www.youtube.com/watch?v=vhUiL_wUAjo) - by Eli Schutze
- [Localizing React Native apps talk from React Native EU 2022](https://www.youtube.com/live/uLicTDG5hSs?feature=share&t=7512)
4 changes: 3 additions & 1 deletion website/docs/ref/macro.md
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,9 @@ const message = t({

### `defineMessage` alias: `msg` {#definemessage}

`defineMessage` macro allows to define message for later use. It has the same signature as `t` macro, but unlike it, it doesn't wrap generated *MessageDescription* into [`i18n._`](/docs/ref/core.md#i18n._) call.
`defineMessage` macro allows to define message for later use. It has the same signature as `t` and returns a `MessageDescriptor` that you can pass to `i18n._` to get a translated string at any time later.

In other words, `t` returns a translated string at the time when it's called, while `msg` returns a ``MessageDescriptor` that can produce translated strings later.

```ts
import { defineMessage } from "@lingui/macro"
Expand Down
Loading