ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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
Gettext\Languages\Exporter
Definition:
Docs.php:2
Gettext\Languages\Exporter\Po\getDescription
static getDescription()
Definition:
Po.php:27
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
Gettext\Languages\Exporter\Po\toStringDo
static toStringDo($languages)
Definition:
Po.php:11
Gettext\Languages\Exporter\Po
Definition:
Po.php:6
Exception
libs
composer
vendor
gettext
languages
src
Exporter
Po.php
Generated on Tue Sep 2 2025 19:02:05 for ILIAS by
1.8.13 (using
Doxyfile
)