# Detecting the Currently selected locale | Next.js Firebase SaaS Kit

> How to detect the currently selected locale so that you can use it in your React components.

*Canonical: https://makerkit.dev/docs/next-fire/how-to/translations/detect-current-locale*

---

To detect the currently selected locale from the client or the server, you can use the `useTranslation` hook from `next-i18next`.

```tsx
import { useTranslation } from 'next-i18next';

function Component() {
  const { i18n } = useTranslation();
  const { language } = i18n;

  // use language here
}
```
