i18n-webpack-plugin
i18n-webpack-plugin copied to clipboard
i18n parameters
Does this plugin support parameters?
I have the following in en.json:
"a": {
"b": {
"header": "Add Bananas to Basket %s"
}
}
and then on a react component, outside the render method:
var x = __("a.b.header", "B2");
This doesn't seem to work as the output is "a.b.header".
@bmpc since this is impossible to tell the difference between
{
"a.b.header": "Add Bananas to Basket %s"
}
And
{
"a": {
"b": {
"header": "Add Bananas to Basket %s"
}
}
}
Not going to implement it in near future😢