当前位置: 首页>>代码示例>>PHP>>正文


PHP Sh404sefHelperGeneral::getInstalledLanguagesList方法代码示例

本文整理汇总了PHP中Sh404sefHelperGeneral::getInstalledLanguagesList方法的典型用法代码示例。如果您正苦于以下问题:PHP Sh404sefHelperGeneral::getInstalledLanguagesList方法的具体用法?PHP Sh404sefHelperGeneral::getInstalledLanguagesList怎么用?PHP Sh404sefHelperGeneral::getInstalledLanguagesList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sh404sefHelperGeneral的用法示例。


在下文中一共展示了Sh404sefHelperGeneral::getInstalledLanguagesList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buildLanguagesSelectList

 /**
  * Method to create a select list of the installed components
  *
  * @access  public
  * @param int ID of current item
  * @param string name of select list
  * @param boolean if true, changing selected item will submit the form (assume is an "adminForm")
  * @param boolean, if true, a line 'Select all' is inserted at the start of the list
  * @param string the "Select all" to be displayed, if $addSelectAll is true
  * @return  string HTML output
  */
 public static function buildLanguagesSelectList($current, $name, $autoSubmit = false, $addSelectAll = false, $selectAllTitle = '', $customSubmit = '')
 {
     // load languages from DB
     $languages = Sh404sefHelperGeneral::getInstalledLanguagesList();
     // adjust to require format
     $data = array();
     if (!empty($languages)) {
         foreach ($languages as $languages) {
             $data[] = array('id' => $languages->shortcode, 'title' => $languages->name);
         }
     }
     // use helper to build html
     $list = self::buildSelectList($data, $current, $name, $autoSubmit, $addSelectAll, $selectAllTitle, $customSubmit);
     // return list
     return $list;
 }
开发者ID:lautarodragan,项目名称:ideary,代码行数:27,代码来源:html.php

示例2: shGetNameFromIsoCode

function shGetNameFromIsoCode($langCode)
{
    static $shLangNameCache = null;
    global $shMosConfig_lang, $shMosConfig_locale, $shLangNameCache;
    if (empty($shLangNameCache)) {
        $type = shIsMultilingual();
        if ($type !== false) {
            $languages = Sh404sefHelperGeneral::getInstalledLanguagesList();
            foreach ($languages as $language) {
                $jfIsoCode = empty($language->shortcode) ? $language->iso : $language->shortcode;
                $shLangNameCache[$jfIsoCode] = $language->code;
            }
            return empty($shLangNameCache[$langCode]) ? $shMosConfig_locale : $shLangNameCache[$langCode];
        } else {
            // no joomfish, so it has to be default language
            return $shMosConfig_locale;
        }
    } else {
        return empty($shLangNameCache[$langCode]) ? $shMosConfig_locale : $shLangNameCache[$langCode];
    }
}
开发者ID:sangkasi,项目名称:joomla,代码行数:21,代码来源:sh404sef.class.php


注:本文中的Sh404sefHelperGeneral::getInstalledLanguagesList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。