I'm struggling to get current locale code from the controller, I would use craft.locale in the template, but craft()->locale does not do the trick.
Any help would be appreciated.
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.Sign up to join this community
craft.locale from a template goes to the
locale() method of the
CraftVariable class, which just calls
craft()->language from PHP, which you could use.