2018-07-09 14:29:13 -07:00
|
|
|
#### No replacements
|
|
|
|
|
|
|
|
```jsx
|
2020-07-29 16:20:05 -07:00
|
|
|
<Intl id="deleteAndRestart" i18n={util.i18n} />
|
2018-07-09 14:29:13 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
#### Single string replacement
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
<Intl id="leftTheGroup" i18n={util.i18n} components={['Alice']} />
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Single tag replacement
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
<Intl
|
|
|
|
id="leftTheGroup"
|
|
|
|
i18n={util.i18n}
|
|
|
|
components={[
|
|
|
|
<button
|
|
|
|
key="external-2"
|
|
|
|
style={{ backgroundColor: 'blue', color: 'white' }}
|
|
|
|
>
|
|
|
|
Alice
|
|
|
|
</button>,
|
|
|
|
]}
|
|
|
|
/>
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Multiple string replacement
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
<Intl
|
|
|
|
id="changedSinceVerified"
|
|
|
|
i18n={util.i18n}
|
2020-07-29 16:20:05 -07:00
|
|
|
components={{
|
|
|
|
name1: 'Alice',
|
|
|
|
name2: 'Bob',
|
|
|
|
}}
|
2018-07-09 14:29:13 -07:00
|
|
|
/>
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Multiple tag replacement
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
<Intl
|
|
|
|
id="changedSinceVerified"
|
|
|
|
i18n={util.i18n}
|
2020-07-29 16:20:05 -07:00
|
|
|
components={{
|
|
|
|
name1: (
|
|
|
|
<button
|
|
|
|
key="external-1"
|
|
|
|
style={{ backgroundColor: 'blue', color: 'white' }}
|
|
|
|
>
|
|
|
|
Alice
|
|
|
|
</button>
|
|
|
|
),
|
|
|
|
name2: (
|
|
|
|
<button
|
|
|
|
key="external-2"
|
|
|
|
style={{ backgroundColor: 'black', color: 'white' }}
|
|
|
|
>
|
|
|
|
Bob
|
|
|
|
</button>
|
|
|
|
),
|
|
|
|
}}
|
2018-07-09 14:29:13 -07:00
|
|
|
/>
|
|
|
|
```
|