globalizejs / globalizejs/globalize
Does Globalize.formatMessage() support passing a variable as path parameter?
Open
- Dominant language
- JavaScript
- Stars
- 4.8k
- Forks
- 585
- PR merge metrics
- No merged PRs in 30d
Description
The following code works well.
`const Globalize = require('globalize');
Globalize.formatMessage('my.path');`
But the following code did not work. That is to say Globalize.formatMessage() only access a string as parameter,if passing a variable as parameter, it doesn't work. I got error "ReferenceError: path is not defined"
Is it the design? if yes, how can I pass a variable to Globalize.formatMessage()?
`const Globalize = require('globalize');
const path = 'my.path';
Globalize.formatMessage(path);`
Contributor guide
Assessment
This issue has not been assessed yet.