Last active
December 17, 2021 10:19
-
-
Save yiminghe/225787d5d54fbfe8751426fe0ac31221 to your computer and use it in GitHub Desktop.
no-react-intl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { createIntl,createIntlCache } = require('@yiminghe/no-react-intl'); | |
const cache = createIntlCache() | |
const intl = createIntl({ | |
locale: 'en', | |
messages: { | |
hello:'hello {name}' | |
} | |
}, cache); | |
console.log(intl.formatMessage({id:'hello'},{ | |
name:'yiminghe' | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment