As the title says, how can I get the default language of my website?

For example, I have Farsi & English language in my website, and Farsi is my default language (but maybe sometimes I want to change it to English).

How can I find out which one is the default one?

1 Answer 1


The default language is stored as a parameter in the language component. So you can use this to get the default language: JComponentHelper::getParams('com_languages')->get('site');.

For the backend language it would be JComponentHelper::getParams('com_languages')->get('administrator');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.