?
avatar davidetaddei
davidetaddei
24 May 2015

Steps to reproduce the issue

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.

Expected result

In my opinion the method should first check the value of the predefined language in the extensions -> language manager -> Installed - Site menu.

Actual result

At the moment it always returns 'en-GB'.

System information (as much as possible)

This is the default installation.

Additional comments

Is there a particulare reason why it has ben set like that?

avatar davidetaddei davidetaddei - open - 24 May 2015
avatar joomla-cms-bot joomla-cms-bot - change - 24 May 2015
Build 3.4.1 staging
avatar mbabker
mbabker - comment - 24 May 2015

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.

avatar Fedik
Fedik - comment - 24 May 2015

@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() :smiley:

avatar zero-24 zero-24 - change - 24 May 2015
The description was changed
avatar brianteeman brianteeman - change - 12 Nov 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-11-12 14:16:52
Closed_By brianteeman
avatar brianteeman brianteeman - close - 12 Nov 2015
avatar brianteeman
brianteeman - comment - 12 Nov 2015

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.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7025.

Add a Comment

Login with GitHub to post a comment