-
Notifications
You must be signed in to change notification settings - Fork 77
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
Would appreciate more detailed documentation for <Localized> #571
Comments
|
@stasm @gregtatum @eemeli - can you help here? |
It would also be great to see some more complex examples involving |
All great questions, @mstange. I don't have the capacity to edit the docs, but if someone is up for doing it based on the implementation, I'll be happy to support that effort by review a PR. |
The replacements only apply to the immediate child, i.e. no deeper than the examples you give.
This depends on the value and attributes of the message that's referred to by the
If the message has a value, then they'll all be replaced. If it only has attributes and you use the
Sure, there's nothing preventing this. With the proviso that if any of the outer components refer to a message that has a non-empty value, all of its inner components will not be rendered.
They do not have any particular meaning in a programmatic sense, so that you're free to use a fallback message that makes sense for your context. |
Thank you! That's very helpful. |
I would appreciate some documentation for
<Localized>
that goes more into specifics. I'm reading https://github.com/projectfluent/fluent.js/wiki/Localized but it's not really answering most of my questions:<Localized>Some string</Localized>
works, and so does<Localized><div>Some string</div></Localized>
, but how deep does it go?<Localized>
contents, in different descendant elements?<Localized>
components be nested? What happens if I nest them?The text was updated successfully, but these errors were encountered: