strapi-plugin-i18n
Version:
This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API
14 lines (9 loc) • 394 B
JavaScript
import { useSelector } from 'react-redux';
import get from 'lodash/get';
const selectContentManagerListViewPluginOptions = state =>
state.get('content-manager_listView').contentType.pluginOptions;
const useHasI18n = () => {
const pluginOptions = useSelector(selectContentManagerListViewPluginOptions);
return get(pluginOptions, 'i18n.localized', false);
};
export default useHasI18n;