本文整理汇总了PHP中eZLocale类的典型用法代码示例。如果您正苦于以下问题:PHP eZLocale类的具体用法?PHP eZLocale怎么用?PHP eZLocale使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了eZLocale类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: convertFromLocaleCurrency
function convertFromLocaleCurrency($toCurrency, $value, $applyRounding = true)
{
$locale = eZLocale::instance();
$fromCurrency = $locale->currencyShortName();
$retValue = $this->convert($fromCurrency, $toCurrency, $value, $applyRounding);
return $retValue;
}
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:7,代码来源:ezcurrencyconverter.php
示例2: getMeta
function getMeta($keyword)
{
$locale = eZLocale::instance();
$siteURL = $this->siteIni->variable('SiteSettings', 'SiteURL');
$metaData = $this->siteIni->variable('SiteSettings', 'MetaDataArray');
return array('title' => sprintf("%s - %s", $keyword, $this->siteIni->variable('SiteSettings', 'SiteName')), 'description' => sprintf('Items on %s related to %s', $siteURL, $keyword), 'language' => $locale->httpLocaleCode(), 'authorName' => $metaData['author'], 'authorMail' => $this->siteIni->variable('MailSettings', 'AdminEmail'), 'siteURL' => $siteURL);
}
开发者ID:informaticatrentina,项目名称:eztagfeed,代码行数:7,代码来源:eztagfeed.php
示例3: locale
function locale()
{
if ( $this->Locale !== null )
return $this->Locale;
$this->Locale = eZLocale::instance( $this->LanguageCode );
return $this->Locale;
}
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:7,代码来源:ezcontentobjecttranslation.php
示例4: __construct
function __construct($identifier)
{
$locale = eZLocale::instance();
$format = OCCalendarData::FULLDAY_IDENTIFIER_FORMAT;
$this->identifier = $identifier;
$dateTime = DateTime::createFromFormat($format, $identifier, OCCalendarData::timezone());
if (!$dateTime instanceof DateTime) {
throw new Exception("{$identifier} in format '{$format}' is not a valid DateTime");
}
$dateTime->setTime(0, 0, 0);
$this->day = $dateTime->format('j');
$this->shortDayName = $locale->shortDayName($dateTime->format('w'));
$this->longDayName = $locale->longDayName($dateTime->format('w'));
$this->month = $dateTime->format('n');
$this->longMonthName = $locale->longMonthName($this->month);
$this->shortMonthName = $locale->shortMonthName($this->month);
$this->year = $dateTime->format('Y');
$this->urlSuffix = "/(day)/{$this->day}/(month)/{$this->month}/(year)/{$this->year}";
$this->dayStartDateTime = clone $dateTime;
$this->dayStartDateTime->setTime(0, 0, 0);
$this->dayStartTimestamp = $this->dayStartDateTime->format('U');
$today = mktime(0, 0, 0, date('n'), date('j'), date('Y'));
$tomorrow = mktime(0, 0, 0, date('n'), date('j') + 1, date('Y'));
$this->isToday = $this->dayStartTimestamp == $today;
$this->isTomorrow = $this->dayStartTimestamp == $tomorrow;
$this->isInWeek = date('W', $this->dayStartTimestamp) == date('W', $today);
$this->isInMonth = date('n', $this->dayStartTimestamp) == date('n', $today);
$this->dayEndDateTime = clone $dateTime;
$this->dayEndDateTime->setTime(23, 59, 59);
$this->dayEndTimestamp = $this->dayEndDateTime->format('U');
$this->container = array();
}
开发者ID:OpencontentCoop,项目名称:ocsearchtools,代码行数:32,代码来源:occalendarday.php
示例5: testIssue13497
/**
* Test for regression #13497:
* attribute operator throws a PHP fatal error on a node without parent in a displayable language
*
* Situation:
* - siteaccess with one language (fre-FR) and ShowUntranslatedObjects disabled
* - parent content node in another language (eng-GB) with always available disabled
* - content node in the siteaccess' language (fre-FR)
* - fetch this fre-FR node from anywhere, and call attribute() on it
*
* Result:
* - Fatal error: Call to a member function attribute() on a non-object in
* kernel/classes/ezcontentobjecttreenode.php on line 4225
*
* Explanation: the error actually comes from the can_remove_location attribute
**/
public function testIssue13497()
{
// Create a folder in english only
$folder = new ezpObject("folder", 2, 14, 1, 'eng-GB');
$folder->setAlwaysAvailableLanguageID(false);
$folder->name = "Parent for " . __FUNCTION__;
$folder->publish();
$locale = eZLocale::instance('fre-FR');
$translation = eZContentLanguage::addLanguage($locale->localeCode(), $locale->internationalLanguageName());
// Create an article in french only, as a subitem of the previously created folder
$article = new ezpObject("article", $folder->attribute('main_node_id'), 14, 1, 'fre-FR');
$article->title = "Object for " . __FUNCTION__;
$article->short_description = "Description of test for " . __FUNCTION__;
$article->publish();
$articleNodeID = $article->attribute('main_node_id');
// INi changes: set language to french only, untranslatedobjects disabled
ezpINIHelper::setINISetting('site.ini', 'RegionalSettings', 'ContentObjectLocale', 'fre-FR');
ezpINIHelper::setINISetting('site.ini', 'RegionalSettings', 'SiteLanguageList', array('fre-FR'));
ezpINIHelper::setINISetting('site.ini', 'RegionalSettings', 'ShowUntranslatedObjects', 'disabled');
eZContentLanguage::expireCache();
// This should crash
eZContentObjectTreeNode::fetch($articleNodeID)->attribute('can_remove_location');
ezpINIHelper::restoreINISettings();
// re-expire cache for further tests
eZContentLanguage::expireCache();
}
开发者ID:runelangseid,项目名称:ezpublish,代码行数:42,代码来源:ezcontentobjecttreenode_regression.php
示例6: testIssue19174
/**
* Regression test for issue {@see #19174 http://issues.ez.no/19174}
*/
public function testIssue19174()
{
$bkpLanguages = eZContentLanguage::prioritizedLanguageCodes();
// add a secondary language
$locale = eZLocale::instance('fre-FR');
$translation = eZContentLanguage::addLanguage($locale->localeCode(), $locale->internationalLanguageName());
// create related objects
$relatedObjectsIds = array($this->createObjectForRelation(), $this->createObjectForRelation(), $this->createObjectForRelation(), $this->createObjectForRelation());
$xmlTextEn = "<embed href=\"ezobject://{$relatedObjectsIds[0]}\" /><link href=\"ezobject://{$relatedObjectsIds[1]}\">link</link>";
$xmlTextFr = "<embed href=\"ezobject://{$relatedObjectsIds[2]}\" /><link href=\"ezobject://{$relatedObjectsIds[3]}\">link</link>";
// Create an article in eng-GB, and embed related object one in the intro
$article = new ezpObject('article', 2, 14, 1, 'eng-GB');
$article->title = __METHOD__ . ' eng-GB';
$article->intro = $xmlTextEn;
$articleId = $article->publish();
// Workaround as setting folder->name directly doesn't produce the expected result
$article->addTranslation('fre-FR', array('title' => __METHOD__ . ' fre-FR', 'intro' => $xmlTextFr));
$relatedObjects = eZContentObject::fetch($articleId)->relatedObjects(false, false, 0, false, array('AllRelations' => eZContentObject::RELATION_LINK | eZContentObject::RELATION_EMBED));
self::assertEquals(4, count($relatedObjects));
$expectedRelations = array_flip($relatedObjectsIds);
foreach ($relatedObjects as $relatedObject) {
if (isset($expectedRelations[$relatedObject->ID])) {
unset($expectedRelations[$relatedObject->ID]);
}
}
self::assertEquals(0, count($expectedRelations));
$article->remove();
$translation->removeThis();
eZContentLanguage::setPrioritizedLanguages($bkpLanguages);
}
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:33,代码来源:ezxmltexttype_regression.php
示例7: __construct
function __construct($value)
{
if ($value instanceof eZCurrency) {
$value = $value->value();
}
$this->Value = $value;
$this->Locale = eZLocale::instance();
}
开发者ID:patrickallaert,项目名称:ezpublish-legacy-php7,代码行数:8,代码来源:ezcurrency.php
示例8: countryISO3166Code
/**
* @param bool $localeString
* @return string
*/
public static function countryISO3166Code( $localeString = false )
{
if ( $localeString === false )
{
$localeString = eZLocale::instance()->localeFullCode();
}
$isoCodes = self::isoCodes( $localeString );
return $isoCodes[1];
}
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:14,代码来源:localeTool.php
示例9: __construct
/**
* Creates a new date object with default locale, if $date is not supplied
* the current date is used.
*
* @note this uses the current Timezone
*
* @param int $date
*/
function __construct($date = false)
{
$dt = new DateTime();
if ($date !== false) {
$dt->setTimestamp($date);
}
$dt->setTime(0, 0, 0);
$this->Date = $dt->getTimestamp();
$this->Locale = eZLocale::instance();
$this->IsValid = $date !== null;
}
开发者ID:charlycoste,项目名称:ezlocale,代码行数:19,代码来源:ezdate.php
示例10: i18n
/**
* i18n
* Provides all i18n strings for use by TinyMCE and other javascript dialogs.
*
* @static
* @param array $args
* @param string $fileExtension
* @return string returns json string with translation data
*/
public static function i18n($args, $fileExtension)
{
$lang = '-en';
$locale = eZLocale::instance();
if ($args && $args[0]) {
$lang = $args[0];
}
$i18nArray = array($lang => array('soextra' => array('font_size' => ezi18n('design/standard/soextra', "Font size"), 'font_class' => ezi18n('design/standard/soextra', "Font style"), 'class' => ezi18n('design/standard/soextra', "Element style"), 'remove_tag' => ezi18n('design/standard/soextra', 'Remove "%tag" tag', null, array('%tag' => '<tag>')), 'remove_tag_keep_contents' => ezi18n('design/standard/soextra', 'Remove "%tag" tag (keep contents)', null, array('%tag' => '<tag>')), 'cursor_before' => ezi18n('design/standard/soextra', 'Place cursor before "%tag"', null, array('%tag' => '<tag>')), 'cursor_after' => ezi18n('design/standard/soextra', 'Place cursor after "%tag"', null, array('%tag' => '<tag>')))));
$i18nString = json_encode($i18nArray);
return 'tinyMCE.addI18n( ' . $i18nString . ' );';
}
开发者ID:stevoland,项目名称:ez_soextra,代码行数:20,代码来源:soextraserverfunctions.php
示例11: modify
/**
* Executes the operators
*
* @param eZTemplate $tpl
* @param string $operatorName
* @param array $operatorParameters
* @param string $rootNamespace
* @param string $currentNamespace
* @param mixed $operatorValue
* @param array $namedParameters
*/
function modify(&$tpl, &$operatorName, &$operatorParameters, &$rootNamespace, &$currentNamespace, &$operatorValue, &$namedParameters)
{
switch ($operatorName) {
case 'opengraph':
$operatorValue = $this->generateOpenGraphTags($namedParameters['nodeid']);
break;
case 'language_code':
$operatorValue = eZLocale::instance()->httpLocaleCode();
break;
}
}
开发者ID:netgen,项目名称:ngopengraph,代码行数:22,代码来源:opengraphoperator.php
示例12: i18n
/**
* i18n
* Provides all i18n strings for use by TinyMCE and other javascript dialogs.
*
* @param array $args
* @param string $fileExtension
* @return string returns json string with translation data
*/
public static function i18n($args, $fileExtension)
{
$lang = '-en';
$locale = eZLocale::instance();
if ($args && $args[0]) {
$lang = $args[0];
}
$i18nArray = array($lang => array('common' => array('edit_confirm' => ezpI18n::tr('design/standard/ezoe', "Do you want to use the WYSIWYG mode for this textarea?"), 'apply' => ezpI18n::tr('design/standard/ezoe', "Apply"), 'insert' => ezpI18n::tr('design/standard/ezoe', "Insert"), 'update' => ezpI18n::tr('design/standard/ezoe', "Update"), 'cancel' => ezpI18n::tr('design/standard/ezoe', "Cancel"), 'close' => ezpI18n::tr('design/standard/ezoe', "Close"), 'browse' => ezpI18n::tr('design/standard/ezoe', "Browse"), 'class_name' => ezpI18n::tr('design/standard/ezoe', "Class"), 'not_set' => ezpI18n::tr('design/standard/ezoe', "-- Not set --"), 'clipboard_msg' => ezpI18n::tr('design/standard/ezoe', "Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?"), 'clipboard_no_support' => ezpI18n::tr('design/standard/ezoe', "Currently not supported by your browser, use keyboard shortcuts instead."), 'popup_blocked' => ezpI18n::tr('design/standard/ezoe', "Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool."), 'invalid_data' => ezpI18n::tr('design/standard/ezoe', "Error: Invalid values entered, these are marked in red."), 'more_colors' => ezpI18n::tr('design/standard/ezoe', "More colors")), 'validator_dlg' => array('required' => ezpI18n::tr('design/standard/ezoe/validator', '"%label" is required and must have a value', null, array('%label' => '<label>')), 'number' => ezpI18n::tr('design/standard/ezoe/validator', '"%label" must be a valid number', null, array('%label' => '<label>')), 'int' => ezpI18n::tr('design/standard/ezoe/validator', '"%label" must be a valid integer number', null, array('%label' => '<label>')), 'url' => ezpI18n::tr('design/standard/ezoe/validator', '"%label" must be a valid absolute url address', null, array('%label' => '<label>')), 'email' => ezpI18n::tr('design/standard/ezoe/validator', '"%label" must be a valid email address', null, array('%label' => '<label>')), 'size' => ezpI18n::tr('design/standard/ezoe/validator', '"%label" must be a valid css size/unit value', null, array('%label' => '<label>')), 'html_id' => ezpI18n::tr('design/standard/ezoe/validator', '"%label" must be a valid html element id', null, array('%label' => '<label>')), 'min' => ezpI18n::tr('design/standard/ezoe/validator', '"%label" must be higher then %min', null, array('%label' => '<label>', '%min' => '<min>')), 'max' => ezpI18n::tr('design/standard/ezoe/validator', '"%label" must be lower then %max', null, array('%label' => '<label>', '%max' => '<max>'))), 'contextmenu' => array('align' => ezpI18n::tr('design/standard/ezoe', "Alignment"), 'left' => ezpI18n::tr('design/standard/ezoe', "Left"), 'center' => ezpI18n::tr('design/standard/ezoe', "Center"), 'right' => ezpI18n::tr('design/standard/ezoe', "Right"), 'full' => ezpI18n::tr('design/standard/ezoe', "Full")), 'insertdatetime' => array('date_fmt' => ezpI18n::tr('design/standard/ezoe', "%Y-%m-%d"), 'time_fmt' => ezpI18n::tr('design/standard/ezoe', "%H:%M:%S"), 'insertdate_desc' => ezpI18n::tr('design/standard/ezoe', "Insert date"), 'inserttime_desc' => ezpI18n::tr('design/standard/ezoe', "Insert time"), 'months_long' => implode(',', $locale->LongMonthNames), 'months_short' => implode(',', $locale->ShortMonthNames), 'day_long' => implode(',', $locale->LongDayNames) . ',' . $locale->longDayName(0), 'day_short' => implode(',', $locale->ShortDayNames) . ',' . $locale->shortDayName(0)), 'print' => array('print_desc' => ezpI18n::tr('design/standard/ezoe', "Print")), 'preview' => array('preview_desc' => ezpI18n::tr('design/standard/ezoe', "Preview")), 'directionality' => array('ltr_desc' => ezpI18n::tr('design/standard/ezoe', "Direction left to right"), 'rtl_desc' => ezpI18n::tr('design/standard/ezoe', "Direction right to left")), 'save' => array('save_desc' => ezpI18n::tr('design/standard/ezoe', "Save"), 'cancel_desc' => ezpI18n::tr('design/standard/ezoe', "Cancel all changes")), 'nonbreaking' => array('nonbreaking_desc' => ezpI18n::tr('design/standard/ezoe', "Insert non-breaking space character")), 'iespell' => array('iespell_desc' => ezpI18n::tr('design/standard/ezoe', "Run spell checking"), 'download' => ezpI18n::tr('design/standard/ezoe', "ieSpell not detected. Do you want to install it now?")), 'advhr' => array('advhr_desc' => ezpI18n::tr('design/standard/ezoe', "Horizontale rule")), 'emotions' => array('emotions_desc' => ezpI18n::tr('design/standard/ezoe', "Emotions")), 'emotions_dlg' => array('title' => ezpI18n::tr('design/standard/ezoe', "Insert emotion"), 'desc' => ezpI18n::tr('design/standard/ezoe', "Emotions"), 'cool' => ezpI18n::tr('design/standard/ezoe', "Cool"), 'cry' => ezpI18n::tr('design/standard/ezoe', "Cry"), 'embarassed' => ezpI18n::tr('design/standard/ezoe', "Embarassed"), 'foot_in_mouth' => ezpI18n::tr('design/standard/ezoe', "Foot in mouth"), 'frown' => ezpI18n::tr('design/standard/ezoe', "Frown"), 'innocent' => ezpI18n::tr('design/standard/ezoe', "Innocent"), 'kiss' => ezpI18n::tr('design/standard/ezoe', "Kiss"), 'laughing' => ezpI18n::tr('design/standard/ezoe', "Laughing"), 'money_mouth' => ezpI18n::tr('design/standard/ezoe', "Money mouth"), 'sealed' => ezpI18n::tr('design/standard/ezoe', "Sealed"), 'smile' => ezpI18n::tr('design/standard/ezoe', "Smile"), 'surprised' => ezpI18n::tr('design/standard/ezoe', "Surprised"), 'tongue_out' => ezpI18n::tr('design/standard/ezoe', "Tongue out"), 'undecided' => ezpI18n::tr('design/standard/ezoe', "Undecided"), 'wink' => ezpI18n::tr('design/standard/ezoe', "Wink"), 'usage' => ezpI18n::tr('design/standard/ezoe', "Use left and right arrows to navigate."), 'yell' => ezpI18n::tr('design/standard/ezoe', "Yell")), 'searchreplace' => array('search_desc' => ezpI18n::tr('design/standard/ezoe', "Find"), 'replace_desc' => ezpI18n::tr('design/standard/ezoe', "Find/Replace")), 'paste' => array('paste_text_desc' => ezpI18n::tr('design/standard/ezoe', "Paste as Plain Text"), 'paste_word_desc' => ezpI18n::tr('design/standard/ezoe', "Paste from Word"), 'selectall_desc' => ezpI18n::tr('design/standard/ezoe', "Select All"), 'plaintext_mode_sticky' => ezpI18n::tr('design/standard/ezoe', "Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode."), 'plaintext_mode' => ezpI18n::tr('design/standard/ezoe', "Paste is now in plain text mode. Click again to toggle back to regular paste mode.")), 'paste_dlg' => array('text_title' => ezpI18n::tr('design/standard/ezoe', "Use CTRL+V on your keyboard to paste the text into the window."), 'text_linebreaks' => ezpI18n::tr('design/standard/ezoe', "Keep linebreaks"), 'word_title' => ezpI18n::tr('design/standard/ezoe', "Use CTRL+V on your keyboard to paste the text into the window.")), 'table' => array('desc' => ezpI18n::tr('design/standard/ezoe', "Inserts a new table"), 'row_before_desc' => ezpI18n::tr('design/standard/ezoe', "Insert row before"), 'row_after_desc' => ezpI18n::tr('design/standard/ezoe', "Insert row after"), 'delete_row_desc' => ezpI18n::tr('design/standard/ezoe', "Delete row"), 'col_before_desc' => ezpI18n::tr('design/standard/ezoe', "Insert column before"), 'col_after_desc' => ezpI18n::tr('design/standard/ezoe', "Insert column after"), 'delete_col_desc' => ezpI18n::tr('design/standard/ezoe', "Remove column"), 'split_cells_desc' => ezpI18n::tr('design/standard/ezoe', "Split merged table cells"), 'merge_cells_desc' => ezpI18n::tr('design/standard/ezoe', "Merge table cells"), 'row_desc' => ezpI18n::tr('design/standard/ezoe', "Table row properties"), 'cell_desc' => ezpI18n::tr('design/standard/ezoe', "Table cell properties"), 'props_desc' => ezpI18n::tr('design/standard/ezoe', "Table properties"), 'paste_row_before_desc' => ezpI18n::tr('design/standard/ezoe', "Paste table row before"), 'paste_row_after_desc' => ezpI18n::tr('design/standard/ezoe', "Paste table row after"), 'cut_row_desc' => ezpI18n::tr('design/standard/ezoe', "Cut table row"), 'copy_row_desc' => ezpI18n::tr('design/standard/ezoe', "Copy table row"), 'del' => ezpI18n::tr('design/standard/ezoe', "Delete table"), 'row' => ezpI18n::tr('design/standard/ezoe', "Row"), 'col' => ezpI18n::tr('design/standard/ezoe', "Column"), 'rows' => ezpI18n::tr('design/standard/ezoe', "Rows"), 'cols' => ezpI18n::tr('design/standard/ezoe', "Columns"), 'cell' => ezpI18n::tr('design/standard/ezoe', "Cell")), 'autosave' => array('unload_msg' => ezpI18n::tr('design/standard/ezoe', "The changes you made will be lost if you navigate away from this page.")), 'fullscreen' => array('desc' => ezpI18n::tr('design/standard/ezoe', "Toggle fullscreen mode")), 'media' => array('desc' => ezpI18n::tr('design/standard/ezoe', "Insert / edit embedded media"), 'edit' => ezpI18n::tr('design/standard/ezoe', "Edit embedded media")), 'fullpage' => array('desc' => ezpI18n::tr('design/standard/ezoe', "Document properties")), 'template' => array('desc' => ezpI18n::tr('design/standard/ezoe', "Insert predefined template content")), 'visualchars' => array('desc' => ezpI18n::tr('design/standard/ezoe', "Visual control characters on/off.")), 'spellchecker' => array('desc' => ezpI18n::tr('design/standard/ezoe', "Toggle spellchecker"), 'menu' => ezpI18n::tr('design/standard/ezoe', "Spellchecker settings"), 'ignore_word' => ezpI18n::tr('design/standard/ezoe', "Ignore word"), 'ignore_words' => ezpI18n::tr('design/standard/ezoe', "Ignore all"), 'langs' => ezpI18n::tr('design/standard/ezoe', "Languages"), 'wait' => ezpI18n::tr('design/standard/ezoe', "Please wait..."), 'sug' => ezpI18n::tr('design/standard/ezoe', "Suggestions"), 'no_sug' => ezpI18n::tr('design/standard/ezoe', "No suggestions"), 'no_mpell' => ezpI18n::tr('design/standard/ezoe', "No misspellings found.")), 'pagebreak' => array('desc' => ezpI18n::tr('design/standard/ezoe', "Insert page break.")), 'advanced' => array('style_select' => ezpI18n::tr('design/standard/ezoe', "Styles"), 'block' => ezpI18n::tr('design/standard/ezoe', "Format"), 'paragraph' => ezpI18n::tr('design/standard/ezoe', "Paragraph"), 'div' => ezpI18n::tr('design/standard/ezoe', "Div"), 'pre' => ezpI18n::tr('design/standard/ezoe', "Literal"), 'h1' => ezpI18n::tr('design/standard/ezoe', "Heading 1"), 'h2' => ezpI18n::tr('design/standard/ezoe', "Heading 2"), 'h3' => ezpI18n::tr('design/standard/ezoe', "Heading 3"), 'h4' => ezpI18n::tr('design/standard/ezoe', "Heading 4"), 'h5' => ezpI18n::tr('design/standard/ezoe', "Heading 5"), 'h6' => ezpI18n::tr('design/standard/ezoe', "Heading 6"), 'code' => ezpI18n::tr('design/standard/ezoe', "Code"), 'samp' => ezpI18n::tr('design/standard/ezoe', "Code sample"), 'dt' => ezpI18n::tr('design/standard/ezoe', "Definition term"), 'dd' => ezpI18n::tr('design/standard/ezoe', "Definition description"), 'bold_desc' => ezpI18n::tr('design/standard/ezoe', "Bold (Ctrl+B)"), 'italic_desc' => ezpI18n::tr('design/standard/ezoe', "Italic (Ctrl+I)"), 'underline_desc' => ezpI18n::tr('design/standard/ezoe', "Underline (Ctrl+U)"), 'striketrough_desc' => ezpI18n::tr('design/standard/ezoe', "Strikethrough"), 'justifyleft_desc' => ezpI18n::tr('design/standard/ezoe', "Align left"), 'justifycenter_desc' => ezpI18n::tr('design/standard/ezoe', "Align center"), 'justifyright_desc' => ezpI18n::tr('design/standard/ezoe', "Align right"), 'justifyfull_desc' => ezpI18n::tr('design/standard/ezoe', "Align full"), 'bullist_desc' => ezpI18n::tr('design/standard/ezoe', "Unordered list"), 'numlist_desc' => ezpI18n::tr('design/standard/ezoe', "Ordered list"), 'outdent_desc' => ezpI18n::tr('design/standard/ezoe', "Outdent"), 'indent_desc' => ezpI18n::tr('design/standard/ezoe', "Indent"), 'undo_desc' => ezpI18n::tr('design/standard/ezoe', "Undo (Ctrl+Z)"), 'redo_desc' => ezpI18n::tr('design/standard/ezoe', "Redo (Ctrl+Y)"), 'link_desc' => ezpI18n::tr('design/standard/ezoe', "Insert/edit link"), 'unlink_desc' => ezpI18n::tr('design/standard/ezoe', "Unlink"), 'image_desc' => ezpI18n::tr('design/standard/ezoe', "Insert/edit image"), 'object_desc' => ezpI18n::tr('design/standard/ezoe', "Insert/edit object"), 'file_desc' => ezpI18n::tr('design/standard/ezoe', "Insert/edit file"), 'custom_desc' => ezpI18n::tr('design/standard/ezoe', "Insert custom tag"), 'literal_desc' => ezpI18n::tr('design/standard/ezoe', "Insert literal text"), 'pagebreak_desc' => ezpI18n::tr('design/standard/ezoe', "Insert pagebreak"), 'disable_desc' => ezpI18n::tr('design/standard/content/datatype', "Disable editor"), 'store_desc' => ezpI18n::tr('design/standard/content/edit', "Store draft"), 'publish_desc' => ezpI18n::tr('design/standard/content/edit', "Send for publishing"), 'discard_desc' => ezpI18n::tr('design/standard/content/edit', "Discard"), 'cleanup_desc' => ezpI18n::tr('design/standard/ezoe', "Cleanup messy code"), 'code_desc' => ezpI18n::tr('design/standard/ezoe', "Edit HTML Source"), 'sub_desc' => ezpI18n::tr('design/standard/ezoe', "Subscript"), 'sup_desc' => ezpI18n::tr('design/standard/ezoe', "Superscript"), 'hr_desc' => ezpI18n::tr('design/standard/ezoe', "Insert horizontal ruler"), 'removeformat_desc' => ezpI18n::tr('design/standard/ezoe', "Remove formatting"), 'custom1_desc' => ezpI18n::tr('design/standard/ezoe', "Your custom description here"), 'charmap_desc' => ezpI18n::tr('design/standard/ezoe', "Insert special character"), 'visualaid_desc' => ezpI18n::tr('design/standard/ezoe', "Toggle guidelines/invisible elements"), 'anchor_desc' => ezpI18n::tr('design/standard/ezoe', "Insert/edit anchor"), 'cut_desc' => ezpI18n::tr('design/standard/ezoe', "Cut"), 'copy_desc' => ezpI18n::tr('design/standard/ezoe', "Copy"), 'paste_desc' => ezpI18n::tr('design/standard/ezoe', "Paste"), 'image_props_desc' => ezpI18n::tr('design/standard/ezoe', "Image properties"), 'newdocument_desc' => ezpI18n::tr('design/standard/ezoe', "New document"), 'help_desc' => ezpI18n::tr('design/standard/ezoe', "Help"), 'clipboard_msg' => ezpI18n::tr('design/standard/ezoe', "Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?"), 'path' => ezpI18n::tr('design/standard/ezoe', "Path"), 'newdocument' => ezpI18n::tr('design/standard/ezoe', "Are you sure you want clear all contents?"), 'toolbar_focus' => ezpI18n::tr('design/standard/ezoe', "Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X"), 'next' => ezpI18n::tr('design/standard/ezoe', "Next"), 'previous' => ezpI18n::tr('design/standard/ezoe', "Previous"), 'select' => ezpI18n::tr('design/standard/ezoe', "Select"), 'type' => ezpI18n::tr('design/standard/ezoe', "Type")), 'advanced_dlg' => array('about_general' => ezpI18n::tr('design/standard/ezoe', "About"), 'about_help' => ezpI18n::tr('design/standard/ezoe', "Help"), 'about_license' => ezpI18n::tr('design/standard/ezoe', "License"), 'about_plugins' => ezpI18n::tr('design/standard/ezoe', "Plugins"), 'about_plugin' => ezpI18n::tr('design/standard/ezoe', "Plugin"), 'about_author' => ezpI18n::tr('design/standard/ezoe', "Author"), 'about_version' => ezpI18n::tr('design/standard/ezoe', "Version"), 'about_loaded' => ezpI18n::tr('design/standard/ezoe', "Loaded plugins"), 'code_title' => ezpI18n::tr('design/standard/ezoe', "HTML Source Editor"), 'code_wordwrap' => ezpI18n::tr('design/standard/ezoe', "Word wrap"), 'colorpicker_title' => ezpI18n::tr('design/standard/ezoe', "Select a color"), 'colorpicker_picker_tab' => ezpI18n::tr('design/standard/ezoe', "Picker"), 'colorpicker_picker_title' => ezpI18n::tr('design/standard/ezoe', "Color picker"), 'colorpicker_palette_tab' => ezpI18n::tr('design/standard/ezoe', "Palette"), 'colorpicker_palette_title' => ezpI18n::tr('design/standard/ezoe', "Palette colors"), 'colorpicker_named_tab' => ezpI18n::tr('design/standard/ezoe', "Named"), 'colorpicker_named_title' => ezpI18n::tr('design/standard/ezoe', "Named colors"), 'colorpicker_color' => ezpI18n::tr('design/standard/ezoe', "Color"), 'colorpicker_name' => ezpI18n::tr('design/standard/ezoe', "Name"), 'charmap_usage' => ezpI18n::tr('design/standard/ezoe', "Use left and right arrows to navigate."), 'charmap_title' => ezpI18n::tr('design/standard/ezoe', "Select special character")), 'ez' => array('root_node_name' => ezpI18n::tr('kernel/content', 'Top Level Nodes'), 'empty_search_result' => ezpI18n::tr('design/standard/content/search', 'No results were found when searching for "%1"', null, array('%1' => '<search_string>')), 'empty_bookmarks_result' => ezpI18n::tr('design/standard/content/view', 'You have no bookmarks')), 'searchreplace_dlg' => array('searchnext_desc' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Find again"), 'notfound' => ezpI18n::tr('design/standard/ezoe/searchreplace', "The search has been completed. The search string could not be found."), 'search_title' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Find"), 'replace_title' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Find/Replace"), 'allreplaced' => ezpI18n::tr('design/standard/ezoe/searchreplace', "All occurrences of the search string were replaced."), 'findwhat' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Find what"), 'replacewith' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Replace with"), 'direction' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Direction"), 'up' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Up"), 'down' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Down"), 'mcase' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Match case"), 'findnext' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Find next"), 'replace' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Replace"), 'replaceall' => ezpI18n::tr('design/standard/ezoe/searchreplace', "Replace all"))));
$i18nString = json_encode($i18nArray);
return 'tinyMCE.addI18n( ' . $i18nString . ' );';
}
开发者ID:legende91,项目名称:ez,代码行数:19,代码来源:ezoeserverfunctions.php
示例13: fetchTranslatedNames
static function fetchTranslatedNames( &$countries )
{
$locale = eZLocale::instance();
$translatedCountryNames = $locale->translatedCountryNames();
foreach ( array_keys( $countries ) as $countryKey )
{
$translatedName = isset( $translatedCountryNames[$countryKey] ) ? $translatedCountryNames[$countryKey] : false;
if ( $translatedName )
$countries[$countryKey]['Name'] = $translatedName;
}
usort( $countries, array( 'eZCountryType', 'compareCountryNames' ) );
}
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:12,代码来源:ezcountrytype.php
示例14: eZDate
function eZDate($date = false)
{
if ($date === false) {
$date = mktime(0, 0, 0);
} else {
$arr = getdate($date);
$date = mktime(0, 0, 0, $arr['mon'], $arr['mday'], $arr['year']);
}
$this->Date = $date;
$this->Locale = eZLocale::instance();
$this->IsValid = true;
}
开发者ID:heliopsis,项目名称:ezpublish-legacy,代码行数:12,代码来源:ezdate.php
示例15: createRedirectionUrl
function createRedirectionUrl($process)
{
//__DEBUG__
$this->logger->writeTimedString("createRedirectionUrl");
//___end____
$paypalINI = eZINI::instance('paypal.ini');
$paypalServer = $paypalINI->variable('ServerSettings', 'ServerName');
$requestURI = $paypalINI->variable('ServerSettings', 'RequestURI');
$business = urlencode($paypalINI->variable('PaypalSettings', 'Business'));
$processParams = $process->attribute('parameter_list');
$orderID = $processParams['order_id'];
$indexDir = eZSys::indexDir();
$localHost = eZSys::serverURL();
$localURI = eZSys::serverVariable('REQUEST_URI');
$order = eZOrder::fetch($orderID);
$amount = urlencode($order->attribute('total_inc_vat'));
$currency = urlencode($order->currencyCode());
// include_once( 'lib/ezlocale/classes/ezlocale.php' );
$locale = eZLocale::instance();
$countryCode = urlencode($locale->countryCode());
$maxDescLen = $paypalINI->variable('PaypalSettings', 'MaxDescriptionLength');
$itemName = urlencode($this->createShortDescription($order, $maxDescLen));
$accountInfo = $order->attribute('account_information');
$first_name = urlencode($accountInfo['first_name']);
$last_name = urlencode($accountInfo['last_name']);
$street = urlencode($accountInfo['street2']);
$zip = urlencode($accountInfo['zip']);
$state = urlencode($accountInfo['state']);
$place = urlencode($accountInfo['place']);
$image_url = "{$localHost}" . urlencode($paypalINI->variable('PaypalSettings', 'LogoURI'));
$background = urlencode($paypalINI->variable('PaypalSettings', 'BackgroundColor'));
$pageStyle = urlencode($paypalINI->variable('PaypalSettings', 'PageStyle'));
$noNote = urlencode($paypalINI->variable('PaypalSettings', 'NoNote'));
$noteLabel = $noNote == 1 ? '' : urlencode($paypalINI->variable('PaypalSettings', 'NoteLabel'));
$noShipping = 1;
$url = $paypalServer . $requestURI . "?cmd=_ext-enter" . "&redirect_cmd=_xclick" . "&business={$business}" . "&item_name={$itemName}" . "&custom={$orderID}" . "&amount={$amount}" . "¤cy_code={$currency}" . "&first_name={$first_name}" . "&last_name={$last_name}" . "&address1={$street}" . "&zip={$zip}" . "&state={$state}" . "&city={$place}" . "&image_url={$image_url}" . "&cs={$background}" . "&page_style={$pageStyle}" . "&no_shipping={$noShipping}" . "&cn={$noteLabel}" . "&no_note={$noNote}" . "&lc={$countryCode}" . "¬ify_url={$localHost}" . $indexDir . "/paypal/notify_url/" . "&return={$localHost}" . $indexDir . "/shop/checkout/" . "&cancel_return={$localHost}" . $indexDir . "/shop/basket/";
//__DEBUG__
$this->logger->writeTimedString("business = {$business}");
$this->logger->writeTimedString("item_name = {$itemName}");
$this->logger->writeTimedString("custom = {$orderID}");
$this->logger->writeTimedString("no_shipping = {$noShipping}");
$this->logger->writeTimedString("localHost = {$localHost}");
$this->logger->writeTimedString("amount = {$amount}");
$this->logger->writeTimedString("currency_code = {$currency}");
$this->logger->writeTimedString("notify_url = {$localHost}" . $indexDir . "/paypal/notify_url/");
$this->logger->writeTimedString("return = {$localHost}" . $indexDir . "/shop/checkout/");
$this->logger->writeTimedString("cancel_return = {$localHost}" . $indexDir . "/shop/basket/");
//___end____
return $url;
}
开发者ID:mugoweb,项目名称:ezpaypal,代码行数:50,代码来源:ezpaypalgateway.php
示例16: number
function number($number, $is_integer)
{
$locale = eZLocale::instance();
if ($is_integer && is_numeric($number) && (int) $number == $number) {
$neg = $number < 0;
$num = $neg ? -$number : $number;
$text = number_format($num, 0, '', $locale->thousandsSeparator());
$text = ($neg ? $locale->negativeSymbol() : $locale->positiveSymbol()) . $text;
return $text;
} else {
if (is_numeric($number)) {
return $locale->formatNumber($number);
} else {
return $number;
}
}
}
开发者ID:netbliss,项目名称:ezsurvey,代码行数:17,代码来源:ezsurveyoperators.php
示例17: attribute
function attribute($attr)
{
if ($attr == 'settings') {
return $this->settings(eZUser::currentUser());
} else {
if ($attr == 'all_week_days') {
return eZLocale::instance()->attribute('weekday_name_list');
} else {
if ($attr == 'all_month_days') {
return range(1, 31);
} else {
if ($attr == 'available_hours') {
return array('0:00', '1:00', '2:00', '3:00', '4:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00');
}
}
}
}
return eZNotificationEventHandler::attribute($attr);
}
开发者ID:rmiguel,项目名称:ezpublish,代码行数:19,代码来源:ezgeneraldigesthandler.php
示例18: eZDateTime
function eZDateTime($datetime = false)
{
if ($datetime instanceof eZDate) {
$arr = getdate($datetime->timeStamp());
$arr2 = getdate($this->DateTime);
$datetime = mktime($arr2['hours'], $arr2['minutes'], $arr2['seconds'], $arr['mon'], $arr['mday'], $arr['year']);
} else {
if ($datetime instanceof eZTime) {
$arr2 = getdate($datetime->timeStamp());
$arr = getdate($this->DateTime);
$datetime = mktime($arr2['hours'], $arr2['minutes'], $arr2['seconds'], $arr['mon'], $arr['mday'], $arr['year']);
} else {
if ($datetime === false) {
$datetime = time();
}
}
}
$this->DateTime = intval($datetime);
$this->Locale = eZLocale::instance();
$this->IsValid = true;
}
开发者ID:heliopsis,项目名称:ezpublish-legacy,代码行数:21,代码来源:ezdatetime.php
示例1 |
请发表评论