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


PHP Localization::getLocaleConfigDefaults方法代码示例

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


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

示例1: upgradeLocaleNameFormat

/**
 * Checks if a locale name format is part of the default list, if not adds it to the config
 * @param $name_format string a local name format string such as 's f l'
 * @return bool true on successful write to config file, false on failure;
 */
function upgradeLocaleNameFormat($name_format)
{
    global $sugar_config, $sugar_version;
    $localization = new Localization();
    $localeConfigDefaults = $localization->getLocaleConfigDefaults();
    $uw_strings = return_module_language($GLOBALS['current_language'], 'UpgradeWizard');
    if (empty($sugar_config['name_formats'])) {
        $sugar_config['name_formats'] = $localeConfigDefaults['name_formats'];
        if (!rebuildConfigFile($sugar_config, $sugar_version)) {
            $errors[] = $uw_strings['ERR_UW_CONFIG_WRITE'];
        }
    }
    if (!in_array($name_format, $sugar_config['name_formats'])) {
        $new_config = sugarArrayMerge($sugar_config['name_formats'], array($name_format => $name_format));
        $sugar_config['name_formats'] = $new_config;
        if (!rebuildConfigFile($sugar_config, $sugar_version)) {
            $errors[] = $uw_strings['ERR_UW_CONFIG_WRITE'];
            return false;
        }
    }
    return true;
}
开发者ID:omusico,项目名称:sugar_work,代码行数:27,代码来源:uw_utils.php

示例2: get_sugar_config_defaults

function get_sugar_config_defaults()
{
    global $locale;
    /**
     * used for getting base values for array style config.php.  used by the
     * installer and to fill in new entries on upgrades.  see also:
     * sugar_config_union
     */
    $sugar_config_defaults = array('admin_export_only' => false, 'export_delimiter' => ',', 'cache_dir' => 'cache/', 'calculate_response_time' => true, 'create_default_user' => false, 'chartEngine' => 'Jit', 'date_formats' => array('Y-m-d' => '2010-12-23', 'm-d-Y' => '12-23-2010', 'd-m-Y' => '23-12-2010', 'Y/m/d' => '2010/12/23', 'm/d/Y' => '12/23/2010', 'd/m/Y' => '23/12/2010', 'Y.m.d' => '2010.12.23', 'd.m.Y' => '23.12.2010', 'm.d.Y' => '12.23.2010'), 'dbconfigoption' => array('persistent' => true, 'autofree' => false, 'debug' => 0, 'seqname_format' => '%s_seq', 'portability' => 0, 'ssl' => false), 'default_action' => 'index', 'default_charset' => return_session_value_or_default('default_charset', 'UTF-8'), 'default_currency_name' => return_session_value_or_default('default_currency_name', 'US Dollar'), 'default_currency_symbol' => return_session_value_or_default('default_currency_symbol', '$'), 'default_currency_iso4217' => return_session_value_or_default('default_currency_iso4217', 'USD'), 'default_currency_significant_digits' => return_session_value_or_default('default_currency_significant_digits', 2), 'default_number_grouping_seperator' => return_session_value_or_default('default_number_grouping_seperator', ','), 'default_decimal_seperator' => return_session_value_or_default('default_decimal_seperator', '.'), 'default_date_format' => 'm/d/Y', 'default_export_charset' => 'UTF-8', 'default_language' => return_session_value_or_default('default_language', 'en_us'), 'default_module' => 'Home', 'default_password' => '', 'default_permissions' => array('dir_mode' => 02770, 'file_mode' => 0660, 'user' => '', 'group' => ''), 'default_theme' => return_session_value_or_default('site_default_theme', 'Sugar5'), 'default_time_format' => 'h:ia', 'default_user_is_admin' => false, 'default_user_name' => '', 'disable_export' => false, 'disable_persistent_connections' => return_session_value_or_default('disable_persistent_connections', 'false'), 'display_email_template_variable_chooser' => false, 'display_inbound_email_buttons' => false, 'dump_slow_queries' => false, 'email_default_editor' => 'html', 'email_default_client' => 'sugar', 'email_default_delete_attachments' => true, 'history_max_viewed' => 50, 'installer_locked' => true, 'import_max_records_per_file' => 100, 'import_max_records_total_limit' => '', 'languages' => array('en_us' => 'English (US)'), 'large_scale_test' => false, 'list_max_entries_per_page' => 20, 'list_max_entries_per_subpanel' => 10, 'lock_default_user_name' => false, 'log_memory_usage' => false, 'portal_view' => 'single_user', 'resource_management' => array('special_query_limit' => 50000, 'special_query_modules' => array('Reports', 'Export', 'Import', 'Administration', 'Sync'), 'default_limit' => 1000), 'require_accounts' => true, 'rss_cache_time' => return_session_value_or_default('rss_cache_time', '10800'), 'save_query' => 'all', 'showDetailData' => true, 'showThemePicker' => true, 'slow_query_time_msec' => '100', 'sugarbeet' => true, 'time_formats' => array('H:i' => '23:00', 'h:ia' => '11:00pm', 'h:iA' => '11:00PM', 'h:i a' => '11:00 pm', 'h:i A' => '11:00 PM', 'H.i' => '23.00', 'h.ia' => '11.00pm', 'h.iA' => '11.00PM', 'h.i a' => '11.00 pm', 'h.i A' => '11.00 PM'), 'tracker_max_display_length' => 15, 'translation_string_prefix' => return_session_value_or_default('translation_string_prefix', false), 'upload_badext' => array('php', 'php3', 'php4', 'php5', 'pl', 'cgi', 'py', 'asp', 'cfm', 'js', 'vbs', 'html', 'htm'), 'upload_maxsize' => 3000000, 'import_max_execution_time' => 3600, 'verify_client_ip' => true, 'js_custom_version' => '', 'js_lang_version' => 1, 'lead_conv_activity_opt' => 'donothing', 'default_number_grouping_seperator' => ',', 'default_decimal_seperator' => '.', 'lock_homepage' => false, 'lock_subpanels' => false, 'max_dashlets_homepage' => '15', 'default_max_tabs' => '7', 'dashlet_display_row_options' => array('1', '3', '5', '10'), 'default_subpanel_tabs' => true, 'default_subpanel_links' => false, 'default_swap_last_viewed' => false, 'default_swap_shortcuts' => false, 'default_navigation_paradigm' => 'gm', 'admin_access_control' => false, 'use_common_ml_dir' => false, 'common_ml_dir' => '', 'vcal_time' => '2', 'passwordsetting' => empty($passwordsetting) ? array('SystemGeneratedPasswordON' => '', 'generatepasswordtmpl' => '', 'lostpasswordtmpl' => '', 'forgotpasswordON' => false, 'linkexpiration' => '1', 'linkexpirationtime' => '30', 'linkexpirationtype' => '1', 'systexpiration' => '0', 'systexpirationtime' => '', 'systexpirationtype' => '0', 'systexpirationlogin' => '') : $passwordsetting, 'use_real_names' => true);
    if (!is_object($locale)) {
        $locale = new Localization();
    }
    $sugar_config_defaults['default_currencies'] = $locale->getDefaultCurrencies();
    $sugar_config_defaults = sugarArrayMerge($locale->getLocaleConfigDefaults(), $sugar_config_defaults);
    return $sugar_config_defaults;
}
开发者ID:razorinc,项目名称:sugarcrm-example,代码行数:16,代码来源:utils.php

示例3: get_sugar_config_defaults

function get_sugar_config_defaults()
{
    global $locale;
    /**
     * used for getting base values for array style config.php.  used by the
     * installer and to fill in new entries on upgrades.  see also:
     * sugar_config_union
     */
    $sugar_config_defaults = array('admin_export_only' => false, 'export_delimiter' => ',', 'calculate_response_time' => true, 'create_default_user' => false, 'date_formats' => array('Y-m-d' => '2006-12-23', 'm-d-Y' => '12-23-2006', 'd-m-Y' => '23-12-2006', 'Y/m/d' => '2006/12/23', 'm/d/Y' => '12/23/2006', 'd/m/Y' => '23/12/2006', 'Y.m.d' => '2006.12.23', 'd.m.Y' => '23.12.2006', 'm.d.Y' => '12.23.2006'), 'dbconfigoption' => array('persistent' => true, 'autofree' => false, 'debug' => 0, 'seqname_format' => '%s_seq', 'portability' => 0, 'ssl' => false), 'default_action' => 'index', 'default_charset' => return_session_value_or_default('default_charset', 'UTF-8'), 'default_currency_name' => return_session_value_or_default('default_currency_name', 'US Dollar'), 'default_currency_symbol' => return_session_value_or_default('default_currency_symbol', '$'), 'default_currency_iso4217' => return_session_value_or_default('default_currency_iso4217', 'USD'), 'default_date_format' => 'Y-m-d', 'default_language' => return_session_value_or_default('default_language', 'en_us'), 'default_module' => 'Home', 'default_password' => '', 'default_theme' => return_session_value_or_default('site_default_theme', 'Sugar'), 'default_time_format' => 'H:i', 'default_user_is_admin' => false, 'default_user_name' => '', 'disable_export' => false, 'disable_persistent_connections' => return_session_value_or_default('disable_persistent_connections', 'false'), 'display_email_template_variable_chooser' => false, 'display_inbound_email_buttons' => false, 'dump_slow_queries' => false, 'history_max_viewed' => 10, 'installer_locked' => true, 'languages' => array('en_us' => 'US English'), 'large_scale_test' => false, 'list_max_entries_per_page' => 20, 'list_max_entries_per_subpanel' => 10, 'lock_default_user_name' => false, 'log_memory_usage' => false, 'login_nav' => false, 'require_accounts' => true, 'rss_cache_time' => return_session_value_or_default('rss_cache_time', '10800'), 'save_query' => 'all', 'slow_query_time_msec' => '100', 'sugarbeet' => true, 'time_formats' => array('H:i' => '23:00', 'h:ia' => '11:00pm', 'h:iA' => '11:00PM', 'H.i' => '23.00', 'h.ia' => '11.00pm', 'h.iA' => '11.00PM'), 'translation_string_prefix' => return_session_value_or_default('translation_string_prefix', false), 'upload_badext' => array('php', 'php3', 'php4', 'php5', 'pl', 'cgi', 'py', 'asp', 'cfm', 'js', 'vbs', 'html', 'htm'), 'upload_maxsize' => 3000000, 'import_max_execution_time' => 3600, 'use_php_code_json' => returnPhpJsonStatus(), 'verify_client_ip' => true, 'js_custom_version' => '', 'js_lang_version' => 1, 'default_number_grouping_seperator' => ',', 'default_decimal_seperator' => '.', 'lock_homepage' => false, 'lock_subpanels' => false, 'max_dashlets_homepage' => '15', 'default_max_tabs' => '12', 'default_max_subtabs' => '12', 'dashlet_display_row_options' => array('1', '3', '5', '10'), 'default_subpanel_tabs' => true, 'default_subpanel_links' => false, 'default_swap_last_viewed' => false, 'default_swap_shortcuts' => false, 'default_navigation_paradigm' => 'm');
    if (!is_object($locale)) {
        if (!class_exists('Localization')) {
            require_once 'include/Localization/Localization.php';
        }
        $locale = new Localization();
    }
    $sugar_config_defaults['default_currencies'] = $locale->getDefaultCurrencies();
    $sugar_config_defaults = sugarArrayMerge($locale->getLocaleConfigDefaults(), $sugar_config_defaults);
    return $sugar_config_defaults;
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:19,代码来源:utils.php


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