kernel/common/ezpi18n.php

Show: inherited
Table of Contents

File containing the ezpI18n class.

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Package
kernel  
Version
4.6.0  

\ezpI18n

Package: kernel

File containing the ezpI18n class.

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Version
4.6.0  

Methods

methodprotectedinsertArguments(  $text, array $arguments ) : string
static

Replaces keys found in \a $text with values in \a $arguments.

If \a $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
Name Type Description
$text
$arguments array
Returns
Type Description
string
methodprotectedisEnabled( ) : bool
static

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

Returns
Type Description
bool
methodpublictr( string $context, string $source, string | null $comment = null, array | null $arguments = null ) : string
static

Translates the source \a $source with context \a $context and optional comment \a $comment and returns the translation if translations are enabled.

Uses {@link 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
Name Type Description
$context string
$source string
$comment string | null
$arguments array | null
Returns
Type Description
string
methodprotectedtranslateText( string $context, string $source, string | null $comment = null, array | null $arguments = null ) : string
static

Translates the source \a $source with context \a $context and optional comment \a $comment and returns the translation if locale code is not eng-GB.

Uses {@link 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
Name Type Description
$context string
$source string
$comment string | null
$arguments array | null
Returns
Type Description
string
Documentation was generated by DocBlox 0.18.1.