Get Current store locale/language programmatically in Magento 2.

Magento 2 with multi-store functionality, Different store view contains different locale.

You can set Different locale from admin panel using Stores -> Configuration -> General Tab.
Click on Locale Options,

store locale
Magento store locale

Set Your locale from the Locale Dropdown box. You must set to this locale at the Store view level.

You can get current store locale programmatically using Resolver class.

Magento\Framework\Locale\Resolver class is used to get the Current store locale code.

I have given a demo using simple Class,

Call from template, $this->getCurrentLocale();
The Result will be,
fr for French Store view.
en for English store view.