2.7.3-sl.20 • Published 4 years ago

@sector-labs/lingui-macro v2.7.3-sl.20

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

License Version Downloads Babel Macro

@lingui/macro

Babel Macros which transforms tagged template literals and JSX components to ICU MessageFormat.

@lingui/macro is part of LinguiJS. See the documentation for all information, tutorials and examples.

Installation

npm install --save-dev @lingui/macro
# yarn add --dev @lingui/macro

Usage

See the reference documentation.

import { setupI18n } from '@lingui/core'
import { t } from '@lingui/macro'

const i18n = setupI18n()

const message = i18n._(t`Hello, my name is ${name} and today is ${date(now)}`)

// line above is transformed using babel-plugin-macros to this
// const message = i18n._(/*i18n*/{ id: "Hello, my name is {name} and today is {now,date}", values: { name, now }})

License

MIT

2.7.3-sl.20

4 years ago

2.9.0-sl.21

4 years ago

2.9.0-sl.22

4 years ago

2.7.3-sl.19

5 years ago

2.7.3-sl.18

5 years ago

2.7.3-sl.17

5 years ago

2.7.3-sl.16

5 years ago

2.7.3-sl.15

5 years ago

2.7.3-sl.14

5 years ago

2.7.3-sl.13

5 years ago

2.7.3-sl.12

5 years ago

2.7.3-sl.11

5 years ago

2.7.3-sl.10

5 years ago

2.7.3-sl.9

5 years ago

2.7.3-sl.8

5 years ago