i18n-webpack-plugin icon indicating copy to clipboard operation
i18n-webpack-plugin copied to clipboard

i18n parameters

Open bmpc opened this issue 9 years ago • 1 comments

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 avatar Feb 27 '17 13:02 bmpc

@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😢

EcutDavid avatar Mar 25 '17 14:03 EcutDavid