Download wp-calypso/client/dashboard/app/locale/index.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 151 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/app/locale/index.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/dashboard/app/locale/index.ts
-
curl -L -o index.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/app/locale/index.ts
151 Bytes
| import { useAuth } from '../auth'; | |
| export function useLocale() { | |
| const { user } = useAuth(); | |
| return user.locale_variant || user.language || 'en'; | |
| } | |