Documentation

內容目录

上一个主题

< Abstract class Phalcon\Translate

下一个主题

Class Phalcon\Translate\Adapter\Csv >

本页

Abstract class Phalcon\Translate\Adapter

Source on GitHub

Base class for Phalcon\Translate adapters

Methods

public __construct (array $options)

...

public setInterpolator (Phalcon\Translate\InterpolatorInterface $interpolator)

...

public string t (string $translateKey, [array $placeholders])

Returns the translation string of the given key

public string _ (string $translateKey, [array $placeholders])

Returns the translation string of the given key (alias of method ‘t’)

public offsetSet (string $offset, string $value)

Sets a translation value

public offsetExists (unknown $translateKey)

Check whether a translation key exists

public offsetUnset (string $offset)

Unsets a translation from the dictionary

public string offsetGet (string $translateKey)

Returns the translation related to the given key

protected replacePlaceholders (unknown $translation, [unknown $placeholders])

Replaces placeholders by the values passed

Follow along: