# General Translation React SDKs (gt-react, gt-next): Handling plurals and branches
URL: https://generaltranslation.com/en-GB/docs/react/guides/handling-plurals-and-branches.mdx
---
title: Handling plurals and branches
description: How to render content based on counts and conditions with the General Translation and components across React, Next.js, TanStack Start and React Native.
related:
links:
- /docs/react/guides/formatting-variables
- /docs/react/guides/translating-jsx
- /docs/react/guides/translating-strings
- /docs/react/guides/translating-with-dictionaries
---
Text that changes based on a count or condition cannot be a single static string, because other languages pluralise and vary differently. Use [``](/docs/react/reference/components/plural) for counts and [``](/docs/react/reference/components/branch) for other conditions so each variation is translated correctly. Both components work the same way in every framework; only the import package differs.
## Pluralise with `` [#plural]
Pass the count as `n` and provide a child for each plural form. General Translation picks the correct form for the active locale using the locale's plural rules.
```tsx
import { T, Plural, Num } from 'gt-react';
You have {count} message.>}
other={<>You have {count} messages.>}
/>
;
```
```tsx
import { T, Plural, Num } from 'gt-next';
You have {count} message.>}
other={<>You have {count} messages.>}
/>
;
```
```tsx
import { T, Plural, Num } from 'gt-tanstack-start';
You have {count} message.>}
other={<>You have {count} messages.>}
/>
;
```
```tsx
import { T, Plural, Num } from 'gt-react-native';
You have {count} message.}
other={You have {count} messages.}
/>
;
```
Provide the plural categories your source language uses (commonly `one` and `other`); translators supply the categories each target language needs, such as `zero`, `two`, `few`, and `many`.
## Branch on a value with `` [#branch]
Use `` to choose content based on an arbitrary value. Pass the value as `branch` and provide a child prop for each possible value, plus `children` as the fallback. Import `Branch` from the same package as [``](/docs/react/reference/components/t).
```tsx
Upgrade to unlock more.
}
pro={Thanks for going Pro!
}
>
Welcome.
;
```
Each branch child is translated independently, so every variation reads naturally in every language.
*Note: The `` component ignores any `data-*` attributes. The linter's [`no-data-attrs-on-branch`](/docs/react/reference/lint-rules) rule flags them.*
## Next steps
- /docs/react/guides/formatting-variables
- /docs/react/guides/translating-jsx
- /docs/react/guides/translating-strings
- /docs/react/guides/translating-with-dictionaries