VuFind API Documentation

TranslatableString
in package
implements TranslatableStringInterface

Class for translatable string with a special default translation.

Tags
category

VuFind

author

Ere Maijala ere.maijala@helsinki.fi

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Site

Interfaces, Classes, Traits and Enums

TranslatableStringInterface
Interface for translatable strings.

Table of Contents

$displayString  : string
Default display string
$string  : string
Original string
$translatable  : bool
Whether translation is allowed
__construct()  : mixed
Constructor
__toString()  : string
Return the original string by default
getDisplayString()  : string
Return string for display if raw value has no translation available (can be further translated)
isTranslatable()  : bool
Checks if the string can be translated

Properties

Methods

__construct()

Constructor

public __construct(string $string, string $displayString[, bool $translatable = true ]) : mixed
Parameters
$string : string

Original string

$displayString : string

Translatable display string

$translatable : bool = true

Whether translation is allowed

Return values
mixed

__toString()

Return the original string by default

public __toString() : string
Return values
string

getDisplayString()

Return string for display if raw value has no translation available (can be further translated)

public getDisplayString() : string
Return values
string

isTranslatable()

Checks if the string can be translated

public isTranslatable() : bool
Return values
bool

Search results