Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
ezpI18n Class Reference

## Static Public Member Functions
static | reset ()
static | tr ( $context, $source, $comment=null, $arguments=null)

## Static Protected Member Functions
static | insertArguments ( $text, $arguments)
static | isEnabled ()
static | translateText ( $context, $source, $comment=null, $arguments=null)

## Static Protected Attributes
static | $isEnabled = null

## Detailed Description

Definition at line 11 of file ezpi18n.php.

## Member Function Documentation

## ◆ insertArguments()

static ezpI18n::insertArguments | ( |  | $text,
|  |  | $arguments
| ) |  |
| static protected

Replaces keys found in $text with values in $arguments. If $arguments is an associative array it will use the argument keys as replacement keys. If not it will convert the index to a key looking like n, where n is a number between 1 and 9.

Parameters

  string | $string |
  array | $arguments |

Returns
  string

Definition at line 31 of file ezpi18n.php.

Referenced by tr(), and translateText().

## ◆ isEnabled()

static ezpI18n::isEnabled | ( |  | ) |
| static protected

Enabled if the site.ini settings RegionalSettings/TextTranslation is set to disabled

Returns
  bool

Definition at line 53 of file ezpi18n.php.

References $isEnabled, and eZTranslatorManager\dynamicTranslationsEnabled().

## ◆ reset()

static ezpI18n::reset | ( |  | ) |
| static

Resets the state ezpI18n class.

Definition at line 67 of file ezpi18n.php.

## ◆ tr()

static ezpI18n::tr | ( |  | $context,
|  |  | $source,
|  |  | $comment = `null`,
|  |  | $arguments = `null`
| ) |  |
| static

Translates the source $source with context $context and optional comment $comment and returns the translation if translations are enabled. Uses ezpI18n::translateText()

Example: translate( 'content/view', 'There are count nodes in this list out of total total nodes.', 'Children view of nodes for whole site', array( 'count' => $c, 'total' => $t ) );

Parameters

  string | $context |
  string | $source |
  string | null | $comment |
  array | null | $arguments |

Returns
  string

Definition at line 86 of file ezpi18n.php.

References insertArguments(), and translateText().

Referenced by eZContentClassPackageCreator\__construct(), eZContentObjectPackageCreator\__construct(), eZExtensionPackageCreator\__construct(), eZStylePackageCreator\__construct(), eZTopMenuOperator\__construct(), eZContentObjectPackageInstaller\__construct(), eZWorkflowGroupType\__construct(), eZWorkflowEventType\__construct(), eZApproveCollaborationHandler\__construct(), eZAuthorType\__construct(), eZBinaryFileType\__construct(), eZBooleanType\__construct(), eZCountryType\__construct(), eZDateType\__construct(), eZDateTimeType\__construct(), eZEmailType\__construct(), eZEnumType\__construct(), eZFloatType\__construct(), eZIdentifierType\__construct(), eZImageType\__construct(), eZIniSettingType\__construct(), eZIntegerType\__construct(), eZISBNType\__construct(), eZKeywordType\__construct(), eZMatrixType\__construct(), eZMediaType\__construct(), eZMultiOptionType\__construct(), eZMultiOption2Type\__construct(), eZMultiPriceType\__construct(), eZObjectRelationType\__construct(), eZObjectRelationListType\__construct(), eZOptionType\__construct(), eZPackageType\__construct(), eZPriceType\__construct(), eZProductCategoryType\__construct(), eZRangeOptionType\__construct(), eZSelectionType\__construct(), eZStringType\__construct(), eZSubtreeSubscriptionType\__construct(), eZTextType\__construct(), eZTimeType\__construct(), eZURLType\__construct(), eZUserType\__construct(), eZXMLTextType\__construct(), eZApproveType\__construct(), eZFinishUserRegisterType\__construct(), eZMultiplexerType\__construct(), eZPaymentGatewayType\__construct(), eZSimpleShippingType\__construct(), eZWaitUntilDateType\__construct(), eZTemplate\__construct(), eZPDFTable\callIndex(), eZPDFTable\callTOC(), eZBinaryFileType\checkFileUploads(), eZMediaType\checkFileUploads(), eZDefaultVATHandler\chooseVatType(), eZUserType\classAttributeRemovableInformation(), eZMultiPriceType\contentActionList(), eZPriceType\contentActionList(), eZDataType\contentActionList(), eZContentObjectTreeNodeOperations\copy(), eZRole\copy(), eZContentObjectTreeNodeOperations\copyPublishContentObject(), eZContentObjectTreeNodeOperations\copySubtree(), eZDiscountSubRule\create(), eZPDFExport\create(), eZRSSExport\create(), eZRSSImport\create(), eZDiscountRule\create(), eZOrderStatus\create(), eZProductCategory\create(), eZVatType\create(), eZRole\createNew(), eZOrderStatus\createUndefined(), eZPDFExport\definition(), eZRSSExport\definition(), eZTemplate\error(), eZContentClassPackageHandler\explainInstallItem(), eZContentObjectPackageHandler\explainInstallItem(), eZExtensionPackageHandler\explainInstallItem(), eZInstallScriptPackageHandler\explainInstallItem(), eZISBN13\extractISBNNumber(), ezi18n(), ezx18n(), eZContentUpload\fetchHTTPFile(), eZCache\fetchList(), eZNavigationPart\fetchList(), eZContentUpload\findHandler(), eZContentUpload\handleLocalFile(), eZContentUpload\handleUpload(), eZContentObjectTreeNode\hiddenStatusString(), eZPackageCreationHandler\httpFileIsImage(), eZNavigationPart\i18nDummy(), eZi18nOperator\i18nTrans(), eZImageAliasHandler\imageName(), eZImageAliasHandler\imageNameByNode(), eZContentClass\initializeCopy(), eZBinaryFileType\insertHTTPFile(), eZImageType\insertHTTPFile(), eZMediaType\insertHTTPFile(), eZImageType\insertRegularFile(), eZContentClassPackageHandler\install(), eZExtensionPackageHandler\install(), eZCollaborationProfile\instance(), eZContentClass\instantiate(), eZPackage\maintainerRoleName(), eZContentObjectTreeNode\makeObjectsArray(), eZi18nOperator\modify(), eZContentUpload\nodeAliasID(), eZPackageCreationHandler\packageChangelogStep(), eZPackageCreationHandler\packageInformationStep(), eZPackageCreationHandler\packageMaintainerStep(), eZPackage\packageRepositories(), eZPackageCreationHandler\packageThumbnailStep(), eZXMLInputParser\parseTag(), eZXMLInputParser\process(), eZXMLInputParser\processAttributesBySchema(), eZXMLInputParser\processBySchemaPresence(), eZXMLInputParser\processBySchemaTree(), eZVatRule\productCategoriesString(), eZSimplifiedXMLInputParser\publishHandlerEmbed(), eZSimplifiedXMLInputParser\publishHandlerLink(), eZSimplifiedXMLInputParser\publishHandlerObject(), eZContentUpload\publishObject(), eZContentClass\removableInformation(), eZCollaborationItemParticipantLink\roleName(), eZXMLInputParser\setAttributes(), eZContentObjectTreeNodeOperations\showNotificationAfterCopying(), eZWorkflow\statusNameMap(), eZWorkflowType\statusNameMap(), eZSimplifiedXMLInputParser\structHandlerHeader(), eZApproveCollaborationHandler\title(), eZContentClassPackageHandler\uninstall(), eZContentObjectPackageHandler\uninstall(), eZMultiOption2Type\validateAddToBasket(), eZContentClassPackageCreator\validateClassData(), eZBooleanType\validateCollectionAttributeHTTPInput(), eZCountryType\validateCollectionAttributeHTTPInput(), eZDateType\validateCollectionAttributeHTTPInput(), eZDateTimeType\validateCollectionAttributeHTTPInput(), eZEmailType\validateCollectionAttributeHTTPInput(), eZIntegerType\validateCollectionAttributeHTTPInput(), eZOptionType\validateCollectionAttributeHTTPInput(), eZSelectionType\validateCollectionAttributeHTTPInput(), eZStringType\validateCollectionAttributeHTTPInput(), eZTextType\validateCollectionAttributeHTTPInput(), eZTimeType\validateCollectionAttributeHTTPInput(), eZStylePackageCreator\validateCSSFile(), eZDateType\validateDateTimeHTTPInput(), eZDateTimeType\validateDateTimeHTTPInput(), eZEmailType\validateEMailHTTPInput(), eZExtensionPackageCreator\validateExtensionName(), eZFloatType\validateFloatHTTPInput(), eZStylePackageCreator\validateImageFiles(), eZSimplifiedXMLInput\validateInput(), eZIntegerType\validateIntegerHTTPInput(), eZISBN13\validateISBN13Checksum(), eZAuthorType\validateObjectAttributeHTTPInput(), eZBinaryFileType\validateObjectAttributeHTTPInput(), eZBooleanType\validateObjectAttributeHTTPInput(), eZCountryType\validateObjectAttributeHTTPInput(), eZDateType\validateObjectAttributeHTTPInput(), eZDateTimeType\validateObjectAttributeHTTPInput(), eZEmailType\validateObjectAttributeHTTPInput(), eZEnumType\validateObjectAttributeHTTPInput(), eZImageType\validateObjectAttributeHTTPInput(), eZIniSettingType\validateObjectAttributeHTTPInput(), eZIntegerType\validateObjectAttributeHTTPInput(), eZISBNType\validateObjectAttributeHTTPInput(), eZKeywordType\validateObjectAttributeHTTPInput(), eZMatrixType\validateObjectAttributeHTTPInput(), eZMediaType\validateObjectAttributeHTTPInput(), eZMultiOptionType\validateObjectAttributeHTTPInput(), eZMultiPriceType\validateObjectAttributeHTTPInput(), eZObjectRelationType\validateObjectAttributeHTTPInput(), eZObjectRelationListType\validateObjectAttributeHTTPInput(), eZOptionType\validateObjectAttributeHTTPInput(), eZPriceType\validateObjectAttributeHTTPInput(), eZProductCategoryType\validateObjectAttributeHTTPInput(), eZRangeOptionType\validateObjectAttributeHTTPInput(), eZSelectionType\validateObjectAttributeHTTPInput(), eZStringType\validateObjectAttributeHTTPInput(), eZTextType\validateObjectAttributeHTTPInput(), eZTimeType\validateObjectAttributeHTTPInput(), eZURLType\validateObjectAttributeHTTPInput(), eZUserType\validateObjectAttributeHTTPInput(), eZContentObjectPackageCreator\validateObjectLimits(), eZContentObjectPackageCreator\validateObjectList(), eZPackageCreationHandler\validatePackageChangelog(), eZPackageCreationHandler\validatePackageInformation(), eZPackageCreationHandler\validatePackageMaintainer(), eZPackageCreationHandler\validatePackageThumbnail(), eZStringType\validateStringHTTPInput(), eZTimeType\validateTimeHTTPInput(), and eZContentObjectPackageInstaller\validateTopNodes().

## ◆ translateText()

static ezpI18n::translateText | ( |  | $context,
|  |  | $source,
|  |  | $comment = `null`,
|  |  | $arguments = `null`
| ) |  |
| static protected

Translates the source $source with context $context and optional comment $comment and returns the translation if locale code is not eng-GB. Uses eZTranslatorMananger::translate() to do the actual translation

Example: translateText( 'content/view', 'There are count nodes in this list out of total total nodes.', 'Children view of nodes for whole site', array( 'count' => $c, 'total' => $t ) );

Parameters

  string | $context |
  string | $source |
  string | null | $comment |
  array | null | $arguments |

Returns
  string

Definition at line 109 of file ezpi18n.php.

References eZTSTranslator\initialize(), eZBorkTranslator\initialize(), insertArguments(), eZLocale\instance(), eZTranslatorManager\instance(), and eZDebug\writeDebug().

Referenced by tr().

## Member Data Documentation

## ◆ $isEnabled

ezpI18n::$isEnabled = null
| static protected

Definition at line 19 of file ezpi18n.php.

Referenced by isEnabled().

The documentation for this class was generated from the following file:

- ezpi18n.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.