-
AuthorPosts
-
micker Friend
micker
- Join date:
- March 2006
- Posts:
- 131
- Downloads:
- 1
- Uploads:
- 3
- Thanks:
- 9
- Thanked:
- 4 times in 1 posts
October 7, 2014 at 1:39 pm #201887hello my customer want to remove en-gb for us … but how to ?
reagrdschavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
October 7, 2014 at 1:48 pm #552120Disable english Language for site.
micker Friendmicker
- Join date:
- March 2006
- Posts:
- 131
- Downloads:
- 1
- Uploads:
- 3
- Thanks:
- 9
- Thanked:
- 4 times in 1 posts
October 7, 2014 at 2:30 pm #552123but we can’t => in langue gestion => this language is protected …
jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
October 7, 2014 at 3:17 pm #552130Hi 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 Vujooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
October 7, 2014 at 3:27 pm #552132Hi 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 -
AuthorPosts
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