# react-native: useSetLocale URL: https://generaltranslation.com/en-GB/docs/react-native/api/helpers/use-set-locale.mdx --- title: useSetLocale description: API reference for the useSetLocale Hook --- {/* AUTO-GENERATED: Do not edit directly. Edit the template in content/docs-templates/ instead. */} ## Overview The `useSetLocale` hook is used to set the user's locale. This is only available client-side, and it must be wrapped in a [``](/docs/react-native/api/components/gtprovider) component. ## Reference ### Returns A function that sets the user's locale. *** ## Examples ### Basic usage ```jsx import { useSetLocale } from 'gt-react-native'; export default function MyComponent() { const setLocale = useSetLocale(); return ; } ``` *** ## Notes * `useSetLocale` is used to set the user's locale. * Learn more about locale codes [here](/docs/core/locales). ## Next steps * Learn more about the [``](/docs/react-native/api/components/gtprovider) component. * Learn more about the [`useLocale`](/docs/react-native/api/helpers/use-locale) hook.