sonicviz / Base-Universe-i18n

2 stars 1 forks source link

using i18n to set property values of a React component is not "reactive" #1

Open pareis opened 7 years ago

pareis commented 7 years ago

I've tried to enhance the following code in imports/ui/pages/login.js:

<FormGroup>
    <ControlLabel><T>common.loginform.Email</T></ControlLabel>
    <FormControl
          type="email"
          ref="emailAddress"
          name="emailAddress"
          placeholder={T.__("common.loginform.Email")}
/>

it is working but it will only ever render the default locale string. It doesn't seem to be reactive. Is there a way to make the direct call to __(key) picking up the changed locale?

sonicviz commented 7 years ago

HI, Apologies for missing this.

re: Is there a way to make the direct call to __(key) picking up the changed locale? I'm not sure.
Maybe ask the Universe I18n devs directly? https://atmospherejs.com/universe/i18n