@sector-labs/lingui-macro

2.7.3-sl.20 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @sector-labs/lingui-macro

Weekly Downloads

1

Version

2.7.3-sl.20

License

MIT

Unpacked Size

62.9 kB

Total Files

11

Last publish

Collaborators

  • mihaitoader
  • liviusl
  • adeelzahir
  • cristi.ingineru
  • cipix2000
  • alexandrukis
  • sectorlabs
  • photonios
  • ovidiu_s
  • alexsfirlea
  • _alexandrukis
  • dolha.dan