Class Socialveo\Core\library\Gettext

InheritanceSocialveo\Core\library\Gettext » Phalcon\Translate\Adapter\Gettext

Class GetText

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Class constructor. Socialveo\Core\library\Gettext
exists() {@inheritdoc} Socialveo\Core\library\Gettext
money() Format money
   $t->money(1234.56, 'USD'); // "$ 1 234.56" or "USD 1 234.56" or "€ 1,234.56" or "1 234.56 EUR", etc
Socialveo\Core\library\Gettext
query() Returns the translation related to the given key Socialveo\Core\library\Gettext

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
replacePlaceholders() Replaces placeholders by the values passed Socialveo\Core\library\Gettext

Property Details

$currencies protected property
protected array $currencies null
$fallbackDomain protected property
protected string $fallbackDomain null
$language protected property
protected string $language null
$locale protected property
protected string $locale null
$moneyFormat protected property
protected array $moneyFormat null

Method Details

__construct() public method

Class constructor.

public void __construct ( $options )
$options
throws Exception
throws Phalcon\Translate\Exception
exists() public method

{@inheritdoc}

public boolean exists ( $index )
$index string
money() public method

Format money

   $t->money(1234.56, 'USD'); // "$ 1 234.56" or "USD 1 234.56" or "€ 1,234.56" or "1 234.56 EUR", etc

public string money ( $number, $currency )
$number integer|float
$currency string
throws Exception
query() public method

Returns the translation related to the given key

public string query ( $index, $domain null, $placeholders null )
$index string
$domain null

[optional]

$placeholders array

[optional]

replacePlaceholders() protected method

Replaces placeholders by the values passed

protected string replacePlaceholders ( $translation, $placeholders null )
$translation string
$placeholders mixed