Definition at line 4 of file Php.php.
◆ getDescription()
static Gettext\Languages\Exporter\Php::getDescription |
( |
| ) |
|
|
static |
◆ toStringDo()
static Gettext\Languages\Exporter\Php::toStringDo |
( |
|
$languages | ) |
|
|
staticprotected |
- See also
- Exporter::toStringDo
Definition at line 9 of file Php.php.
References $lc, and array.
13 $lines[] =
'return array(';
14 foreach ($languages as
$lc) {
15 $lines[] =
' \''.$lc->id.
'\' =>
array(
'; 16 $lines[] = ' \
'name\' => \''.addslashes($lc->name).
'\',
'; 17 if (isset($lc->supersededBy)) { 18 $lines[] = ' \
'supersededBy\' => \''.$lc->supersededBy.
'\',
'; 20 if (isset($lc->script)) { 21 $lines[] = ' \
'script\' => \''.addslashes($lc->script).
'\',
'; 23 if (isset($lc->territory)) { 24 $lines[] = ' \
'territory\' => \''.addslashes($lc->territory).
'\',
'; 26 if (isset($lc->baseLanguage)) { 27 $lines[] = ' \
'baseLanguage\' => \''.addslashes($lc->baseLanguage).
'\',
'; 29 $lines[] = ' \
'formula\' => \''.$lc->formula.
'\',
'; 30 $lines[] = ' \
'plurals\' => '.count($lc->categories).
',';
32 foreach ($lc->categories as $c) {
33 $catNames[] =
"'{$c->id}'";
35 $lines[] =
' \'cases\' => array('.implode(
', ', $catNames).
'),';
36 $lines[] =
' \'examples\' => array(';
37 foreach ($lc->categories as $c) {
38 $lines[] =
' \''.$c->id.
'\' => \
''.$c->examples.
'\',
'; 46 return implode("\n", $lines); Create styles array
The data for the language used.
The documentation for this class was generated from the following file:
- libs/composer/vendor/gettext/languages/src/Exporter/Php.php