ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
Po.php
Go to the documentation of this file.
1
<?
php
2
namespace
Gettext\Languages\Exporter
;
3
4
use
Exception
;
5
6
class
Po
extends
Exporter
7
{
11
protected
static
function
toStringDo
(
$languages
)
12
{
13
if
(count(
$languages
) !== 1) {
14
throw
new
Exception
(
'The '
.get_called_class().
' exporter can only export one language'
);
15
}
16
$language
=
$languages
[0];
17
$lines = array();
18
$lines[] =
'"Language: '
.$language->id.
'\n"'
;
19
$lines[] =
'"Plural-Forms: nplurals='
.count(
$language
->categories).
'; plural='
.
$language
->formula.
'\n"'
;
20
$lines[] =
''
;
21
22
return
implode(
"\n"
, $lines);
23
}
27
public
static
function
getDescription
()
28
{
29
return
'Build a string to be used for gettext .po files'
;
30
}
31
}
Gettext\Languages\Exporter\Exporter
Base class for all the exporters.
Definition:
Exporter.php:10
$language
$language
Definition:
frontpage_federation.php:120
Gettext\Languages\Exporter
Definition:
Docs.php:2
Gettext\Languages\Exporter\Po\getDescription
static getDescription()
Definition:
Po.php:27
Gettext\Languages\Exporter\Po\toStringDo
static toStringDo($languages)
Definition:
Po.php:11
php
$languages
$languages
Definition:
cssgen2.php:34
Gettext\Languages\Exporter\Po
Definition:
Po.php:6
Exception
libs
composer
vendor
gettext
languages
src
Exporter
Po.php
Generated on Thu Jan 16 2025 19:01:40 for ILIAS by
1.8.13 (using
Doxyfile
)