Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to get a string instead of an object (component) as a translation product? #149

Closed
zannix opened this issue Feb 14, 2019 · 3 comments

Comments

@zannix
Copy link

zannix commented Feb 14, 2019

Is there a way to get a string instead of an object (component) as a translation product?

In my project I am using another component that expects a string prop (which would ideally be the translated string from react-localize-redux lib), and I don't know how to get that.

Edit: If it helps, I am doing this outside render function, in a component helper function that doesn't return anything.

Which versions of react and react-localize-redux are you using?
6.4.1
3.5.2

@ryandrewjohnson
Copy link
Owner

I'm going to need some more detail to help you out. Ideally a working example in codesandbox, or at the very least a code snippet I can look at.

@raheelkhan
Copy link

I am also looking for the same.
I have a case where i have a input field element. The placeholder attribute of input field needs to be translated.

let placeHolder = <Translate id="myPlaceHolder" />;
<Input placeholder={placeHolder} /> // yeilds [object Object]

@ryandrewjohnson
Copy link
Owner

Duplicate of #145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants