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


PHP i18n_r函数代码示例

本文整理汇总了PHP中i18n_r函数的典型用法代码示例。如果您正苦于以下问题:PHP i18n_r函数的具体用法?PHP i18n_r怎么用?PHP i18n_r使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: c_monthChange

function c_monthChange($where)
{
    if (!isset($_GET['month']) or empty($_GET['month'])) {
        $_GET['month'] = date('n');
    }
    if (!isset($_GET['year']) or empty($_GET['year'])) {
        $_GET['year'] = date('Y');
    }
    $months = array('', i18n_r('calendar/January'), i18n_r('calendar/February'), i18n_r('calendar/March'), i18n_r('calendar/April'), i18n_r('calendar/May'), i18n_r('calendar/June'), i18n_r('calendar/July'), i18n_r('calendar/August'), i18n_r('calendar/September'), i18n_r('calendar/October'), i18n_r('calendar/November'), i18n_r('calendar/December'));
    $month_m = $_GET['month'] - 1;
    $month_p = $_GET['month'] + 1;
    $year_m = $_GET['year'] - 1;
    $year_p = $_GET['year'] + 1;
    echo '<center>';
    if ($_GET['month'] == 1) {
        $month_m = 12;
        echo '<a href="' . $where . '&month=' . $month_m . '&year=' . $year_m . '">' . $months[$month_m] . ' ' . $year_m . '</a>';
    } else {
        echo '<a href="' . $where . '&month=' . $month_m . '&year=' . $_GET['year'] . '">' . $months[$month_m] . ' ' . $_GET['year'] . '</a>';
    }
    echo ' << ' . $months[$_GET['month']] . ' ' . $_GET['year'] . ' >> ';
    if ($_GET['month'] == 12) {
        $month_p = 1;
        echo '<a href="' . $where . '&month=' . $month_p . '&year=' . $year_p . '">' . $months[$month_p] . ' ' . $year_p . '</a>';
    } else {
        echo '<a href="' . $where . '&month=' . $month_p . '&year=' . $_GET['year'] . '">' . $months[$month_p] . ' ' . $_GET['year'] . '</a>';
    }
    echo '</center>';
}
开发者ID:Vin985,项目名称:clqweb,代码行数:29,代码来源:calendar.php

示例2: addTools

 private static function addTools($date, $pos)
 {
     $text = '<div class="tools flex">';
     $text .= '<form method="post" id="calendarForm" action="load.php?id=calendar"
      accept-charset="utf-8">';
     $text .= '<input type="hidden" name="action" value="" />';
     $text .= '<input type="hidden" name="date" value="' . $date->date . '" />';
     $text .= '<input type="hidden" name="pos" value="' . $pos . '" />';
     // Edit event
     $text .= '<button type="button" class="edit button-img" tabindex="0"';
     $text .= 'title="Edit event"';
     $text .= 'onclick="javascript:change_form_action($(this).closest(\'form\'), \'edit\')"';
     $text .= '</button>';
     // Remove event
     $text .= '<button type="button" class="delete button-img" tabindex="0"';
     $text .= 'title="Remove event"';
     $text .= 'onclick="javascript:jConfirm(\'';
     $text .= i18n_r('calendar/CONFIRM_DEL_EVENT');
     $text .= '\', \'Confirmation\',';
     $text .= 'function() { change_form_action($(this).closest(\'form\'), \'delete\')}.bind($(this)))"';
     $text .= '</button>';
     $text .= '</form>';
     $text .= '</div>';
     return $text;
 }
开发者ID:Vin985,项目名称:clqweb,代码行数:25,代码来源:frontend.class.php

示例3: __construct

 public function __construct()
 {
     $this->cur_lang = return_i18n_languages()[0];
     if (!$this->checkPrerequisites()) {
         throw new \Exception(i18n_r('rates/MISSING_DIR'));
     }
 }
开发者ID:Vin985,项目名称:clqweb,代码行数:7,代码来源:rates.class.php

示例4: __construct

 public function __construct()
 {
     $this->cur_lang = return_i18n_languages()[0];
     if (!$this->checkPrerequisites()) {
         throw new \Exception(i18n_r('calendar/MISSING_DIR'));
     }
     $this->schedule = $this->loadSchedule();
 }
开发者ID:Vin985,项目名称:clqweb,代码行数:8,代码来源:calendar.class.php

示例5: DM_nibbler_init

function DM_nibbler_init()
{
    global $nibblercode, $DM_nibbler_config_file, $thisfile_nibbler;
    $success = null;
    $error = null;
    if (isset($_POST['submit'])) {
        $nibblercode = isset($_POST['nibblercode']) ? $_POST['nibblercode'] : $nibblercode;
        if (!$error) {
            $xml = @new SimpleXMLElement('<item></item>');
            $xml->addChild('nibblercode', $nibblercode);
            if (!$xml->asXML($DM_nibbler_config_file)) {
                $error = i18n_r($thisfile_nibbler . '/NIBBLER_ERROR');
            } else {
                $x = getXML($DM_nibbler_config_file);
                $nibblercode = $x->nibblercode;
                $success = i18n_r($thisfile_nibbler . '/NIBBLER_SUCCESS');
            }
        }
    }
    //Main Navigation For Admin Panel
    ?>

	<h3 class="floated"><?php 
    echo i18n_r($thisfile_nibbler . '/NIBBLER_TITLE');
    ?>
</h3>  <br/><br/>
	<?php 
    if ($success) {
        echo '<p style="color:#669933;"><b>' . $success . '</b></p>';
    }
    if ($error) {
        echo '<p style="color:#cc0000;"><b>' . $error . '</b></p>';
    }
    ?>
	<form method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
		<p><label for="nibblercode" ><?php 
    echo i18n_r($thisfile_nibbler . '/NIBBLER_DESC');
    ?>
</label>
			<input id="nibblercode" name="nibblercode" class="text" value="<?php 
    echo $nibblercode;
    ?>
" />
		</p>
		<p><input type="submit" id="submit" class="submit" value="<?php 
    echo i18n_r($thisfile_nibbler . '/NIBBLER_SAVE');
    ?>
" name="submit" /></p>
	</form>



<?php 
}
开发者ID:n00dles,项目名称:DM_nibbler,代码行数:57,代码来源:DM_nibbler.php

示例6: jQuery_migrate_init

function jQuery_migrate_init()
{
    global $thisfile_GSJQM, $SITEURL;
    i18n_merge($thisfile_GSJQM) || i18n_merge($thisfile_GSJQM, GSDEFAULTLANG);
    # register plugin
    register_plugin($thisfile_GSJQM, i18n_r($thisfile_GSJQM . '/GSJQMigrate_TITLE'), '1.0', 'GetSimpleCMS', 'http://get-simple.info', i18n_r($thisfile_GSJQM . '/GSJQMigrate_DESC'), '', '');
    $asset = isDebug() ? 'jquery-migrate-1.2.1.js' : 'jquery-migrate-1.2.1.min.js';
    // when debug is on, migrate will output to console with deprecated notices.
    $url = $SITEURL . 'plugins/' . $thisfile_GSJQM . '/assets/js/' . $asset;
    register_script('jquerymigrate', $url, '', FALSE);
    queue_script('jquerymigrate', GSBACK);
}
开发者ID:HelgeSverre,项目名称:GetSimpleCMS,代码行数:12,代码来源:GSJQueryMigrate.php

示例7: info

 public static function info($info)
 {
     $plugin = array();
     $plugin['id'] = self::FILE;
     $plugin['name'] = i18n_r(self::FILE . '/PLUGIN_TITLE');
     $plugin['version'] = self::VERSION;
     $plugin['author'] = self::AUTHOR;
     $plugin['url'] = self::URL;
     $plugin['description'] = i18n_r(self::FILE . '/PLUGIN_DESC');
     $plugin['page'] = self::FILE;
     $plugin['sidebar'] = i18n_r(self::FILE . '/PLUGIN_SIDEBAR');
     if (isset($plugin[$info])) {
         return $plugin[$info];
     } else {
         return null;
     }
 }
开发者ID:n00dles,项目名称:DM_Matrix,代码行数:17,代码来源:plugin.php

示例8: nm_save_settings

function nm_save_settings()
{
    global $NMPAGEURL, $NMPRETTYURLS, $NMLANG, $NMSHOWEXCERPT, $NMEXCERPTLENGTH, $NMPOSTSPERPAGE, $NMRECENTPOSTS, $NMSETTING;
    $backup = array('page_url' => $NMPAGEURL, 'pretty_urls' => $NMPRETTYURLS);
    # parse $_POST
    $NMPAGEURL = $_POST['page-url'];
    $NMPRETTYURLS = isset($_POST['pretty-urls']) ? 'Y' : '';
    $NMLANG = $_POST['language'];
    $NMSHOWEXCERPT = $_POST['show-excerpt'] ? 'Y' : '';
    $NMEXCERPTLENGTH = intval($_POST['excerpt-length']);
    $NMPOSTSPERPAGE = intval($_POST['posts-per-page']);
    $NMRECENTPOSTS = intval($_POST['recent-posts']);
    # new settings since 3.0
    $NMSETTING = array();
    $NMSETTING['archivesby'] = $_POST['archivesby'];
    $NMSETTING['readmore'] = $_POST['readmore'];
    $NMSETTING['titlelink'] = $_POST['titlelink'];
    $NMSETTING['gobacklink'] = $_POST['gobacklink'];
    $NMSETTING['images'] = $_POST['images'];
    $NMSETTING['imagewidth'] = $_POST['imagewidth'];
    $NMSETTING['imageheight'] = $_POST['imageheight'];
    $NMSETTING['imagecrop'] = isset($_POST['imagecrop']);
    $NMSETTING['imagealt'] = isset($_POST['imagealt']);
    $NMSETTING['imagelink'] = isset($_POST['imagelink']);
    $NMSETTING['enablecustomsettings'] = isset($_POST['enablecustomsettings']);
    $NMSETTING['customsettings'] = get_magic_quotes_gpc() == 0 ? $_POST['customsettings'] : stripslashes($_POST['customsettings']);
    # write settings to file
    if (nm_settings_to_xml()) {
        nm_generate_sitemap();
        nm_display_message(i18n_r('news_manager/SUCCESS_SAVE'));
    } else {
        nm_display_message(i18n_r('news_manager/ERROR_SAVE'), true);
    }
    # should we update .htaccess?
    if ($NMPRETTYURLS == 'Y') {
        if ($backup['pretty_urls'] != 'Y' || $backup['page_url'] != $NMPAGEURL) {
            nm_display_message(sprintf(i18n_r('news_manager/UPDATE_HTACCESS'), 'load.php?id=news_manager&amp;htaccess'), true);
        }
    }
    # clear registered image sizes for pic.php - since 3.2
    foreach (glob(NMDATAPATH . 'images.*.txt') as $file) {
        unlink($file);
    }
}
开发者ID:hatasu,项目名称:appdroid,代码行数:44,代码来源:settings.php

示例9: generateSitemap

 public static function generateSitemap()
 {
     global $SITEURL;
     self::generateSitemapWithoutPing();
     if (!defined('GSDONOTPING') || !GSDONOTPING) {
         if (file_exists(GSROOTPATH . 'sitemap.xml')) {
             if (200 === ($status = pingGoogleSitemaps($SITEURL . 'sitemap.xml'))) {
                 #sitemap successfully created & pinged
                 return true;
             } else {
                 error_log(i18n_r('SITEMAP_ERRORPING'));
                 return i18n_r('SITEMAP_ERRORPING');
             }
         } else {
             error_log(i18n_r('SITEMAP_ERROR'));
             return i18n_r('SITEMAP_ERROR');
         }
     } else {
         #sitemap successfully created - did not ping
         return true;
     }
 }
开发者ID:Vin985,项目名称:clqweb,代码行数:22,代码来源:sitemap.class.php

示例10: auto_import

function auto_import()
{
    $Blog = new Blog();
    if ($_GET['import'] == urldecode($Blog->getSettingsData("autoimporterpass")) && $Blog->getSettingsData("autoimporter") == 'Y') {
        ini_set("memory_limit", "350M");
        define('MAGPIE_CACHE_DIR', GSCACHEPATH . 'magpierss/');
        require_once BLOGPLUGINFOLDER . 'inc/magpierss/rss_fetch.inc';
        $rss_feed_file = getXML(BLOGRSSFILE);
        foreach ($rss_feed_file->rssfeed as $the_fed) {
            $rss_uri = $the_fed->feed;
            $rss_category = $the_fed->category;
            $rss = fetch_rss($rss_uri);
            $items = array_slice($rss->items, 0);
            foreach ($items as $item) {
                $post_data['title'] = $item['title'];
                $post_data['slug'] = '';
                $post_data['date'] = $item['pubdate'];
                $post_data['private'] = '';
                $post_data['tags'] = '';
                $post_data['category'] = $rss_category;
                if ($Blog->getSettingsData('rssinclude') == 'Y') {
                    if (!empty($item['content']['encoded'])) {
                        $post_data['content'] = htmlentities($item['content']['encoded'], ENT_QUOTES, 'iso-8859-1');
                    } else {
                        $post_data['content'] = htmlentities($item['summary'], ENT_QUOTES, 'iso-8859-1') . '<p class="blog_auto_import_readmore"><a href="' . $item['link'] . '" target="_blank">' . i18n_r(BLOGFILE . '/READ_FULL_ARTICLE') . '</a></p>';
                    }
                } else {
                    $post_data['content'] = htmlentities($item['summary'], ENT_QUOTES, 'iso-8859-1') . '<p class="blog_auto_import_readmore"><a href="' . $item['link'] . '" target="_blank">' . i18n_r(BLOGFILE . '/READ_FULL_ARTICLE') . '</a></p>';
                }
                $post_data['excerpt'] = $Blog->create_excerpt($item['summary'], 0, $Blog->getSettingsData("excerptlength"));
                $post_data['thumbnail'] = auto_import_thumbnail($item);
                $post_data['current_slug'] = '';
                $post_data['author'] = htmlentities('<a href="' . $rss_uri . '">RSS Feed</a>', ENT_QUOTES, 'iso-8859-1');
                $Blog->savePost($post_data, true);
                echo '<p class="blog_rss_post_added">' . i18n_r(BLOGFILE . '/ADDED') . ': ' . $post_data['title'] . '</p>';
            }
        }
    }
}
开发者ID:hatasu,项目名称:appdroid,代码行数:39,代码来源:rssAutoImporter.php

示例11: check_for_csrf

/**
 * check for csrfs
 * @param  string $action action to pass to check_nonce
 * @param  string $file   file to pass to check_nonce
 * @param  bool   $die    if false return instead of die
 * @return bool   returns true if csrf check fails
 */
function check_for_csrf($action, $file = "", $die = true)
{
    // check for csrf
    if (!getDef('GSNOCSRF', true)) {
        $nonce = $_REQUEST['nonce'];
        if (!check_nonce($nonce, $action, $file)) {
            exec_action('csrf');
            // @hook csrf a csrf was detected
            if (requestIsAjax()) {
                $error = i18n_r("CSRF", "CRSF Detected!");
                echo "<div>";
                // jquery bug will not parse 1 html element so we wrap it
                include 'template/error_checking.php';
                echo "</div>";
                die;
            }
            if ($die) {
                die(i18n_r("CSRF", "CRSF Detected!"));
            }
            return true;
        }
    }
}
开发者ID:kix23,项目名称:GetSimpleCMS,代码行数:30,代码来源:security_functions.php

示例12: find_accesskey

echo find_accesskey(i18n_r('MENU_MANAGER'));
?>
" <?php 
check_menu('menu-manager');
?>
><?php 
i18n('MENU_MANAGER');
?>
</a></li>
	<?php 
exec_action("pages-sidebar");
// @hook pages-sidebar sidebar list html output
?>
</ul>

<p id="js_submit_line" ></p>

<?php 
if (get_filename_id() === 'edit') {
    ?>
	<?php 
    if (getDef('GSAUTOSAVE')) {
        ?>
	<p id="autosavestatus"><?php 
        echo sprintf(i18n_r("AUTOSAVE_STATUS"), getDef('GSAUTOSAVE'));
        ?>
</p>
	<p id="autosavenotify"></p>
	<?php 
    }
}
开发者ID:kix23,项目名称:GetSimpleCMS,代码行数:31,代码来源:sidebar-pages.php

示例13: set_blog_title

function set_blog_title()
{
    global $title, $blogSettings, $post;
    // Declare GLOBAL variables
    $slug = base64_encode(return_page_slug());
    // What page are we on?
    if ($slug == base64_encode($blogSettings["blogurl"])) {
        // If we're on the blog page...
        if (isset($_GET['post']) && !empty($post)) {
            // If viewing a post...
            $title = (string) $post->title;
            // Set title of post
        } else {
            if (isset($_GET['archive'])) {
                // If viewing an archive...
                // Set the archive title
                $title = (string) i18n_r(BLOGFILE . '/ARCHIVE_PRETITLE') . date('F Y', strtotime($_GET['archive']));
            } else {
                if (isset($_GET['category'])) {
                    // If viewing a category...
                    $title = (string) i18n_r(BLOGFILE . '/CATEGORY_PRETITLE') . $_GET['category'];
                    // Set category title
                }
            }
        }
    }
    $title = strip_tags(strip_decode($title));
    // Clean the title variable
}
开发者ID:Luigi-,项目名称:gs-blog,代码行数:29,代码来源:frontEndFunctions.php

示例14: i18n

			<h3><?php 
i18n('GETTING_STARTED');
?>
</h3>
			
			<ul>
				<li><a href="http://get-simple.info/wiki/" target="_blank" ><?php 
i18n('SIDE_DOCUMENTATION');
?>
</a></li>
				<li><a href="http://get-simple.info/forum/" target="_blank" ><?php 
i18n('SUPPORT_FORUM');
?>
</a></li>
				<li><a href="http://get-simple.info/extend/" target="_blank" ><?php 
echo str_replace(array('<em>', '</em>'), '', i18n_r('GET_PLUGINS_LINK'));
?>
</a></li>
				<li><a href="share.php?term=<?php 
i18n('SHARE');
?>
" rel="facybox" ><?php 
i18n('SHARE');
?>
 GetSimple</a></li>
			</ul>
			
			<p><?php 
i18n('WELCOME_MSG');
?>
 <?php 
开发者ID:google-code-backups,项目名称:get-simple-cms,代码行数:31,代码来源:support.php

示例15: i18n

">&lt;</a></td>
            <td class="secondarylink"><a href="#" class="moveRight" title="<?php 
        i18n('i18n_navigation/INDENT');
        ?>
">&gt;</a></td>
            <td class="secondarylink"><a href="#" class="toggleMenu" title="<?php 
        i18n('i18n_navigation/TOGGLE_MENU');
        ?>
">M</a></td>
            <td class="secondarylink"><a href="#" class="togglePrivate" title="<?php 
        i18n('i18n_navigation/TOGGLE_PRIVATE');
        ?>
">P</a></td>
	          <td class="secondarylink">
	            <a title="<?php 
        echo i18n_r('VIEWPAGE_TITLE') . ': ' . stripslashes($page['title']);
        ?>
" target="_blank" href="<?php 
        echo $i18n_url ? find_i18n_url($page['url'], $page['parent'], $def_language) : find_url($page['url'], $page['parent']);
        ?>
">#</a>
	          </td>
           </tr>
        <?php 
        $i++;
    }
}
?>
        </tbody>
			</table>
      <input type="submit" name="save" value="<?php 
开发者ID:Vin985,项目名称:clqweb,代码行数:31,代码来源:structure.php


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