tudro Posted March 28, 2016 Share Posted March 28, 2016 Hello, I have 2 languages, one for admin and one for the frontend. In a backend module i need to get the frontend language. How is this possible? Thank you Link to comment Share on other sites More sharing options...
roja45 Posted March 28, 2016 Share Posted March 28, 2016 it depends on which context your in, if you're executing a display hook for the frontend, $this->context->language->id will be the frontend language in the frontend, if you're executing a hook for the backend, or in a AdminController, you'll get the language of the user logged into the backend. Link to comment Share on other sites More sharing options...
tudro Posted March 28, 2016 Author Share Posted March 28, 2016 Thank you for the info, it's a backend module as i said, so context->language gives me the backend language. I need to find a way to get the frontend one. Thank you Link to comment Share on other sites More sharing options...
musicmaster Posted March 29, 2016 Share Posted March 29, 2016 Language in the backoffice is connected with the employee. So you should change the settings for the employee name on which you login. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now