Download wp-calypso/client/state/selectors/get-current-locale-slug.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 306 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/selectors/get-current-locale-slug.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/selectors/get-current-locale-slug.js
-
curl -L -o get-current-locale-slug.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/selectors/get-current-locale-slug.js
306 Bytes
| import { get } from 'lodash'; | |
| import 'calypso/state/ui/init'; | |
| /** | |
| * Gets the current ui locale slug | |
| * @param {Object} state - global redux state | |
| * @returns {string} current state value | |
| */ | |
| export default function getCurrentLocaleSlug( state ) { | |
| return get( state, 'ui.language.localeSlug', null ); | |
| } | |