MIDDAG for Moodle

translator_interface

Interface for translation services.

Decouples the framework from Moodle's get_string() global.

Table of Contents

Methods

has()  : bool
Check if a translation exists.
trans()  : string
Translate a string identifier.

Methods

has()

Check if a translation exists.

public has(string $identifier[, null|string $component = null ]) : bool
Parameters
$identifier : string
$component : null|string = null
Return values
bool

trans()

Translate a string identifier.

public trans(string $identifier[, null|string $component = null ][, mixed $args = null ]) : string
Parameters
$identifier : string

The string key

$component : null|string = null

The component (plugin) name

$args : mixed = null

Arguments to inject into the string

Return values
string

The translated string


        
On this page

Search results