Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • micker Friend
    #201887

    hello my customer want to remove en-gb for us … but how to ?
    reagrds

    chavan Friend
    #552120

    Disable english Language for site.

    micker Friend
    #552123

    but we can’t => in langue gestion => this language is protected …

    jooservices Friend
    #552130

    Hi there,
    Just want to make sure which one you want to remove.


    Site default English (United Kingdom) (en-GB - Change )

    at


    index.php?option=com_jalang&view=tool

    Is this one ?

    Thank you,
    Viet Vu

    jooservices Friend
    #552132

    Hi there,
    I have just checked into our component code


    $defaultLanguage = JalangHelper::getLanguage();


    <thead>
    <tr>
    <th class="nowrap hidden-phone" style="width: 100px;">
    <?php echo JText::_('FROM') ?>
    <!--<sup>[?]</sup>-->
    </th>
    <td class="hidden-phone">
    <strong><?php echo $defaultLanguage->name ; ?></strong>
    (<?php echo $defaultLanguage->element ; ?> -
    <a class="modal" rel="{handler: 'iframe'}" href="<?php echo JRoute::_('index.php?option=com_languages&view=installed&client=0'); ?>" target="_blank" title="<?php echo JText::_('CHANGE'); ?>"><?php echo JText::_('CHANGE'); ?></a>
    )
    </td>
    </tr>
    </thead>

    We always have default language at top of list.
    Traced back to helper


    public static function getLanguage($lang_code = null) {
    if(!$lang_code) {
    $lang_code = self::getDefaultLanguage();
    }
    $db = JFactory::getDbo();
    $query = $db->getQuery(true);
    $query->select(array($db->quoteName('extension_id'), $db->quoteName('name'), $db->quoteName('type'), $db->quoteName('element')))->from('#__extensions');
    $query->where(array($db->quoteName('type').'='.$db->quote('language'),
    $db->quoteName('client_id').'='.$db->quote('0'),
    $db->quoteName('element').'='.$db->quote($lang_code) ));
    $db->setQuery($query);
    $lang = $db->loadObject();
    return $lang;
    }


    public static function getDefaultLanguage()
    {
    static $lang;
    // We need to go to com_languages to get the site default language, it's the best we can guess.
    if (empty($lang))
    }
    return $lang;
    } {
    $lang = JComponentHelper::getParams('com_languages')->get('site', 'en-GB');

    Default language will use Joomla! API to get. It’s mean it used your default site language 🙂
    Just check it .

    Thank you,
    Viet Vu

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 3 voices, and was last updated by  jooservices 10 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum