In fact it is used all over the CMS under the form
$lang = JFactory::getLanguage();
[...]
$lang->load([...]$lang->getDefault()[...]
It always returns the current JPATH language if available, en-GB if
the specific ini file is not present.
See function
public function load($extension = 'joomla', $basePath = JPATH_BASE,
$lang = null, $reload = false, $default = true)
JM
>--
>You received this message because you are subscribed to the Google
>Groups "Joomla! CMS Development" group.
>To post to this group, send an email to joomla-...@googlegroups.com.
>To unsubscribe from this group, send email to
>joomla-dev-cm...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
--
>Please keep the Subject wording in your answers
This e-mail and any attachments may be confidential. You must not
disclose or use the information contained in this e-mail if you are
not the
intended recipient. If you have received this e-mail in error, please
notify us immediately and delete the e-mail and all copies.
-----------------------------------------------------------
Jean-Marie Simonet / infograf768
Joomla Production Working group
Joomla! Translation Coordination Team
>
>
>@Jean-Marie:
>"It always returns the current JPATH language if available, en-GB if
>the specific ini file is not present. "
>Yes, but I think that behavior is wrong. If current language is not
>found, it should not return en-GB but instead the site default
>language.
>
>Here is a simpler way to "view" this.
>
>Setup an out of the box localized version of Joomla, the one from
>joomla.fr will do fine. It has both en-GB and fr-FR installed and fr-
>FR is the default language.
>
>Now edit /components/com_content/content.php, and add near the top:
>
>echo JFactory::getLanguage()->getDefault();
>
>Visit any J! content page on the site (home page will do). I believe
>this should display fr-FR, the site default language, but it displays
>en-GB.
>
>Yannick
>
>
>On 21 fév, 11:25, elin <elin.war...@gmail.com> wrote:
>> I think I had this issue too when working on some language issues in Smart
>> Search.
>>
>> Elin
>
Okay so if I understand correctly there are two different ways that people are interpreting default. One is the site default in a mulitlingual site, the other is a default when there is no language defined at all, which is the fall back to en-GB. For Search, for example, we would want to assume the language * is the site default language not English. Other than that we don't care. For other situations you want the en-GB value available.
Is that right?
Elin
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-cms/-/SIixbNqDTSsJ.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
First, what language do we assume something is written in given the absence of information about the content?Second, what do we do when there are missing language files?