Translation: ezcTranslation
[ ]
[ Linguist format ]
[ ]
[ ]
[ ]
[ ]
Class: ezcTranslation
|
ezcTranslation is a container that holds the translated strings for a specific context. [
source]
ezcTranslation objects are returned by the ezcTranslationManager for every requested context.
Method Summary
|
public ezcTranslation |
__construct(
$data )
Constructs the ezcTranslation object. |
|
public string |
getTranslation(
$key, [$params = array()] )
Returns the translated version of the original string $key. |
Methods
__construct
ezcTranslation __construct(
$data )
Constructs the ezcTranslation object.
The constructor receives an array containing the map between the original string and the translation.
Parameters
| Name |
Type |
Description |
$data |
array(string=>ezcTranslationData) |
|
getTranslation
string getTranslation(
string
$key, [
$params = array()] )
Returns the translated version of the original string $key.
This method returns a translated string and substitutes the parameters $param in the localized string.
Parameters
| Name |
Type |
Description |
$key |
string |
|
$params |
array(string=>string) |
|
Throws
| Class | Description |
ezcTranslationKeyNotAvailableException |
when the key is not available |
ezcTranslationParameterMissingException |
when not enough parameters are passed for a parameterized string |
Last updated: Wed, 28 Nov 2007