class \mpf\translators\Sql

class \mpf\translators\Sql

Inheritance \mpf\base\Object
Implements -
Uses \mpf\interfaces\TranslatorInterface
Childs -
Available since version  0.1
Source Code https://github.com/mpf-soft/mpf/tree/master/translators/Sql.php

Description of Sql

@author mirel

Attributes
private static \mpf\translators\Sql[] $instance

-no description found-

public string $table = "translations"

Name of the table where the translations are found {language} can be used here and it will be replaced by the actual used language when it will be translated. This way it will allow to save types: - one table with all languages on separate columns - multiple tables, one for each language

public string $columnText = "text"

Name of the column that contains the original text

public string $columnTranslation = "translation_{language}"

Name of the column that contains translated text. {language} can be used here and it will be replaced by the actual used language when it will be translated.

protected mixed $translations = []

-no description found-

Methods

public static \mpf\translators\TranslatorInterface get (array $config = [])

  • $config

    -no description found-

-no description found-

public mixed setLanguage (mixed $language)

  • $language

    -no description found-

-no description found-

public mixed t (mixed $text, mixed $class = null)

  • $text

    -no description found-

  • $class

    -no description found-

-no description found-