ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
Jed.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Gettext\Generators
;
4
5
use
Gettext\Translations
;
6
7
class
Jed
extends
PhpArray implements
GeneratorInterface
8
{
12
public
static
function
toString
(
Translations
$translations)
13
{
14
$array =
static::toArray
($translations);
15
16
return
json_encode($array);
17
}
18
22
protected
static
function
buildArray
(
Translations
$translations)
23
{
24
$array = array();
25
26
$context_glue =
"\004"
;
27
28
foreach
($translations as $translation) {
29
$key
= ($translation->hasContext() ? $translation->getContext().$context_glue :
''
).$translation->getOriginal();
30
31
if
($translation->hasPluralTranslation()) {
32
$array[
$key
] = array_merge(array($translation->getTranslation()), $translation->getPluralTranslation());
33
}
else
{
34
$array[
$key
] = array($translation->getTranslation());
35
}
36
}
37
38
return
$array;
39
}
40
}
php
An exception for terminatinating execution or to throw for unit testing.
Gettext\Generators\Jed
Definition:
Jed.php:8
Gettext\Generators\Jed\buildArray
static buildArray(Translations $translations)
{@parentdoc}.
Definition:
Jed.php:22
Gettext\Generators\Jed\toString
static toString(Translations $translations)
{@parentDoc}.
Definition:
Jed.php:12
Gettext\Translations
Class to manage a collection of translations.
Definition:
Translations.php:12
$key
$key
Definition:
croninfo.php:18
Gettext\Generators\GeneratorInterface
Definition:
GeneratorInterface.php:8
Gettext\Generators
Definition:
CsvDictionary.php:3
ILIAS\UI\Implementation\Component\toArray
toArray($value)
Wrap the given value in an array if it is no array.
Definition:
ComponentHelper.php:211
libs
composer
vendor
gettext
gettext
src
Generators
Jed.php
Generated on Tue Sep 30 2025 19:00:53 for ILIAS by
1.9.4 (using
Doxyfile
)