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


PHP I18n::export方法代码示例

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


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

示例1:

 *         field: '#images',
 *         preview: '#preview'
 *     });
 *
 * This helper stores the list of images in the following format
 * in the input field, so you can easily split them into an array:
 *
 *     /files/file1.jpg|/files/file2.jpg|/files/file3.png
 *
 * Options:
 *
 * - field:   The selector of an input field to update with the list.
 * - preview: The selector of an element to use to contain the list preview.
 */

echo $this->run ('filemanager/util/browser');

$page->add_style ('/apps/filemanager/css/multi-image.css');
$page->add_script (
	sprintf (
		'<script>var filemanager_path = "%s";</script>',
		conf('Paths','filemanager_path')
	)
);
$page->add_script ('/js/jquery-ui/jquery-ui.min.js');
$page->add_script ('/apps/filemanager/js/jquery.multi-image.js');
$page->add_script (I18n::export (
	'Click to remove, drag to re-order',
	'Browse images'
));
开发者ID:R-J,项目名称:elefant,代码行数:30,代码来源:multi-image.php

示例2: conf

 *
 *      $.filebrowser ({
 *          allowed: ['jpg', 'jpeg', 'png', 'gif'],
 *          set_value: '#field-id',
 *          title: 'Choose an image',
 *          thumbs: true,
 *          callback: function (file) {
 *              console.log ('You chose: '  + file);
 *          }
 *     });
 *
 * Options:
 *
 * - `allowed`   - An array of allowed file extensions.
 * - `callback`  - A function to call with the chosen file link.
 * - `set_value` - The selector of an input field to update with the
 *   chosen file link.
 * - `thumbs`    - Whether to show thumbnails instead of file names.
 *   Note: also automatically sets allowed list to jpeg, png, and
 *   gif formats so you don't have to set allowed explicitly.
 * - `title`     - A custom title for the dialog window.
 */
echo $this->run('admin/util/modal');
$page->add_style('/apps/filemanager/css/filebrowser.css');
$page->add_script(sprintf('<script>var filemanager_path = "%s", filemanager_upload = %d;</script>', conf('Paths', 'filemanager_path'), (int) User::require_acl('admin', 'filemanager')));
$page->add_script('/apps/filemanager/js/jquery.filedrop.js');
$page->add_script('/apps/filemanager/js/filemanager.js');
$page->add_script('/apps/filemanager/js/jquery.filebrowser.js');
$page->add_script(sprintf('<script>var filebrowser_max_filesize = %s;</script>', (int) ini_get('upload_max_filesize')));
$page->add_script(I18n::export(array('Choose a file', 'New file', 'Please upload one of the following file types', 'Your browser does not support drag and drop file uploads.', 'Please upload fewer files at a time.', 'The following file is too large to upload', 'Uploading...', 'Select')));
开发者ID:Selwyn-b,项目名称:elefant,代码行数:30,代码来源:browser.php

示例3: array

    $o->parts = array();
    $o->lastpath = '';
    foreach ($tmp as $part) {
        $joined .= $sep . $part;
        $sep = '/';
        $o->parts[$part] = $joined;
        $o->lastpath = $part;
    }
    $page->window_title = __('Files') . '/' . $o->path;
} else {
    $o->path = '';
    $o->fullpath = $root;
    $o->parts = array();
    $o->lastpath = '';
    $page->window_title = __('Files');
}
if ($appconf['General']['aviary_key']) {
    $page->add_script('https://dme0ih8comzn4.cloudfront.net/imaging/v1/editor.js');
    $o->aviary_key = $appconf['General']['aviary_key'];
} else {
    $o->aviary_key = false;
}
$page->add_style('/apps/filemanager/css/filemanager.css');
$page->add_script(sprintf('<script>var conf_root = "%s";</script>', conf('Paths', 'filemanager_path')));
$page->add_script('/js/jquery-ui/jquery-ui.min.js');
$page->add_script('/js/urlify.js');
$page->add_script('/apps/filemanager/js/jquery.filedrop.js');
$page->add_script('/apps/filemanager/js/jquery.tmpl.beta1.min.js');
$page->add_script('/apps/filemanager/js/jquery.filemanager.js');
$page->add_script(I18n::export('New folder name:', 'Rename:', 'Are you sure you want to delete this file?', 'Are you sure you want to delete this folder and all of its contents?', 'Your browser does not support drag and drop file uploads.', 'Please upload fewer files at a time.', 'The following file is too large to upload'));
echo $tpl->render('filemanager/index', $o);
开发者ID:Selwyn-b,项目名称:elefant,代码行数:31,代码来源:index.php

示例4:

 *
 *      {! admin/util/dynamicobjects !}
 *
 * ### 2. Use the `$.dynamicobjects()` function to open the dialog window:
 *
 *      $.dynamicobjects ({
 *          set_value: '#field-id',
 *          callback: function (embed_code, handler, params, label) {
 *              console.log (embed_code);
 *              console.log (handler);
 *              console.log (params);
 *              console.log (label);
 *          }
 *     });
 *
 * Options:
 *
 * - `callback` - A function to call with the resulting embed code.
 * - `set_value` - The selector of an input field to update with the
 *   resulting embed code.
 * - `current` - Current embed code, for updating existing values.
 */
$this->run('admin/util/fontawesome');
$this->run('admin/util/modal');
$this->run('filemanager/util/browser');
$page->add_style('/apps/admin/css/dynamicobjects.css');
$page->add_script('/js/jquery.verify_values.js');
$page->add_script('/js/jquery.quickpager.js');
$page->add_script('/apps/admin/js/jquery.dynamicobjects.js');
$page->add_script(I18n::export('Dynamic Objects', 'Unable to load the dynamic object list. Please try again in a few seconds.', 'Embed', 'Back'));
开发者ID:Selwyn-b,项目名称:elefant,代码行数:30,代码来源:dynamicobjects.php

示例5:

 * ### 2. User the `$.userchooser()` function to open the dialog window:
 *
 *     $.userchooser ({
 *         set_id_value: '#field-id',
 *         set_name_value: '#display-name',
 *         callback: function (id, name, email) {
 *             console.log (id);
 *             console.log (name);
 *             console.log (email);
 *         }
 *     });
 *
 * Options:
 *
 * - `callback`        - A function to call with the user id, name, and email.
 * - `chosen`          - A list of users that shouldn't be selectable.
 * - `chosen_visible`  - Whether to display the disabled chosen users or hide them.
 * - `set_id_value`    - The selector of an input or element to update with the user id.
 * - `set_name_value`  - The selector of an input or element to update with the user name.
 * - `set_email_value` - The selector of an input or element to update with the user email.
 * - `set_mailto`      - The selector of a link to set the mailto: value for.
 */
$this->run('admin/util/fontawesome');
$this->run('admin/util/modal');
$page->add_style('/apps/user/css/userchooser.css');
$page->add_script('/js/jquery.quickpager.js');
$page->add_script('/js/jquery.verify_values.js');
$page->add_script('/apps/user/js/jquery.adduser.js');
$page->add_script('/apps/user/js/jquery.userchooser.js');
$page->add_script(I18n::export('Add Member', 'Choose a Member', 'Search', 'Unable to load the member list. Please try again in a few seconds.'));
开发者ID:Selwyn-b,项目名称:elefant,代码行数:30,代码来源:userchooser.php

示例6: elseif

<?php

/**
 * Outputs the admin toolbar if the user is an admin,
 * otherwise simply loads jQuery for other scripts that
 * may rely on it.
 */
if ($appconf['Scripts']['jquery_source'] === 'local') {
    $page->add_script('/js/jquery-1.8.3.min.js');
} elseif ($appconf['Scripts']['jquery_source'] === 'google') {
    $page->add_script('<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>');
} else {
    $page->add_script('<script src="' . $appconf['Scripts']['jquery_source'] . '"></script>');
}
if (User::require_admin() && $page->preview == false) {
    $page->add_style('/apps/admin/css/jquery.jgrowl.css');
    $page->add_style('/apps/admin/css/modal.css');
    $page->add_style(Product::toolbar_stylesheet());
    $page->add_script("<script>\$(function(){\$.elefant_version='" . ELEFANT_VERSION . "';});</script>\n");
    $page->add_script("<script>\$(function(){\$.elefant_updates=" . (int) conf('General', 'check_for_updates') . ";});</script>\n");
    $page->add_script('/apps/admin/js/modal.js');
    $page->add_script('/apps/admin/js/jquery.jgrowl.min.js');
    $page->add_script('/apps/admin/js/jquery.triggers.js');
    $page->add_script('/js/jquery.cookie.js');
    $page->add_script('/apps/admin/js/jquery.i18n.js');
    $page->add_script('/apps/admin/js/top-bar.js');
    $page->add_script(I18n::export('List keyboard shortcuts', 'Keyboard shortcuts'));
}
开发者ID:R-J,项目名称:elefant,代码行数:28,代码来源:head.php

示例7:

 *         preview: '#preview'
 *     });
 *
 * This helper stores the list of files in the following format
 * in the input field, so you can easily split them into an array:
 *
 *     /files/file1.txt|/files/file2.doc|/files/file3.txt
 *
 * Options:
 *
 * - field:   The selector of an input field to update with the list.
 * - preview: The selector of an element to use to contain the list preview.
 */

echo $this->run ('filemanager/util/browser');
echo $this->run ('admin/util/fontawesome');

$page->add_style ('/apps/filemanager/css/multi-file.css');
$page->add_script (
	sprintf (
		'<script>var filemanager_path = "%s";</script>',
		conf('Paths','filemanager_path')
	)
);
$page->add_script ('/js/jquery-ui/jquery-ui.min.js');
$page->add_script ('/apps/filemanager/js/jquery.multi-file.js');
$page->add_script (I18n::export (
	'Click to remove',
	'Browse files'
));
开发者ID:R-J,项目名称:elefant,代码行数:30,代码来源:multi-file.php

示例8:

 *     
 *     if ($_POST['type'] === 'select') {
 *         echo Template::sanitize ($_POST['label']);
 *         return;
 *     }
 *     echo Template::sanitize ($_POST['value']);
 *
 * To send an error message, use the following code:
 *
 *     $this->add_notification (__ ('Unable to save changes.'));
 *     echo $this->error (500, 'Error message');
 *     return;
 *
 * To add a notification upon successful requests, you can also use the
 * [[Controller]]'s `add_notification()` method:
 *
 *     $this->add_notification (__ ('Changes saved.'));
 *     echo Template::sanitize ($_POST['value']);
 */
$this->run('admin/util/i18n');
$page->add_style('/apps/admin/css/editable.css');
$page->add_script('/apps/admin/js/jquery.autogrow.min.js');
$page->add_script('/apps/admin/js/jquery.jeditable.min.js');
$page->add_script('/apps/admin/js/jquery.jeditable.autogrow.js');
$page->add_script('/apps/admin/js/editable.js');
$page->add_script('/apps/admin/js/jquery.jeditable.deletable.js');
if (isset($data['url'])) {
    $page->add_script('<script>var editable_default_url = \'' . $data['url'] . '\';</script>');
}
$page->add_script(I18n::export('Saving...', 'Cancel', 'Save', 'Delete', 'Click to edit', 'Unable to save changes.', 'Are you sure you want to delete this item?'));
开发者ID:Selwyn-b,项目名称:elefant,代码行数:30,代码来源:editable.php

示例9: test_export

 function test_export()
 {
     $expected = "<script>\$(function(){\$.i18n_append({\n\t'One': 'One',\n\t'Don\\'t': 'Don\\'t'\n});});</script>\n";
     $this->assertEquals($expected, I18n::export(array('One', 'Don\'t')));
     $this->assertEquals($expected, I18n::export('One', 'Don\'t'));
 }
开发者ID:Selwyn-b,项目名称:elefant,代码行数:6,代码来源:I18nTest.php


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