fluent.js icon indicating copy to clipboard operation
fluent.js copied to clipboard

React: Support complex DOM trees in overlays

Open nitn3lav opened this issue 1 year ago • 0 comments

Because:

  • Sometimes, the line between UI localization and content localization is thin. There are cases in which we should allow localizing longer, structured text with nested overlays. See #288

This PR:

  • Adds a prop, nestedElems, to LocalizedProps and an arg, arg.nestedElems, to Localized.getElement() that allows consumers to opt-in to recursively parse nested elements in overlays. By default this is disabled.

nitn3lav avatar Sep 18 '23 15:09 nitn3lav