fluent.js
    Preparing search index...

    Function Localized

    • The Localized class renders its child with translated props and children.

      The id prop should be the unique identifier of the translation. Any attributes found in the translation will be applied to the wrapped element.

      Arguments to the translation can be passed as $-prefixed props on Localized.

      It's recommended that the contents of the wrapped component be a string expression. The string will be used as the ultimate fallback if no translation is available. It also makes it easy to grep for strings in the source code.

      Parameters

      Returns ReactElement

      <Localized id="hello-world">
      <p>{'Hello, world!'}</p>
      </Localized>

      <Localized id="hello-world" $username={name}>
      <p>{'Hello, { $username }!'}</p>
      </Localized>