You can get the current store’s, store code value in Magento 2.
You need to use Magento\Store\Model\StoreManagerInterface interface for fetching current store locale.
I have given a demo using Block Class,
You can get the current store’s, store code value in Magento 2.
You need to use Magento\Store\Model\StoreManagerInterface interface for fetching current store locale.
I have given a demo using Block Class,