In Joomla 3.4.1 the JLanguage class has method getDefault which returns the $default property which has a fixed value of 'en-GB', check file libraries/joomla/language/language.php at row 1114 and row 46.
In my opinion the method should first check the value of the predefined language in the extensions -> language manager -> Installed - Site menu.
At the moment it always returns 'en-GB'.
This is the default installation.
Is there a particulare reason why it has ben set like that?
Build | 3.4.1 | ⇒ | staging |
@davidetaddei JLanguage::getDefault()
return default language for "fallback", means used while string translation and translation not found.
It not the same as the site default language.
But I think, something like getFallbackLanguage()
would be more clear than getDefault()
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-11-12 14:16:52 |
Closed_By | ⇒ | brianteeman |
It has been 6 months since the last comment on this issue and based on the comments above I am closing this as it isn't going anywhere.
Structurally it'd be a bad idea to change JLanguage like this; it would couple a top level library API to a specific component's implementation. Plus, if it were going to pull from the Language Manager's config, it should be app aware (so if you're in admin you should be getting the admin default).
One option would be to set the default when the object is created via JFactory based on this config.