ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Gettext\Languages\Exporter\Po Class Reference
+ Inheritance diagram for Gettext\Languages\Exporter\Po:
+ Collaboration diagram for Gettext\Languages\Exporter\Po:

Static Public Member Functions

static getDescription ()
 
- Static Public Member Functions inherited from Gettext\Languages\Exporter\Exporter
static getExporters ($onlyForPublicUse=false)
 Return the list of all the available exporters. More...
 
static getExporterDescription ($exporterHandle)
 Return the description of a specific exporter. More...
 
static getExporterClassName ($exporterHandle)
 Returns the fully qualified class name of a exporter given its handle. More...
 
static toString ($languages, $options=null)
 Convert a list of Language instances to string. More...
 
static toFile ($languages, $filename, $options=null)
 Save the Language instances to a file. More...
 
static isForPublicUse ()
 Is this exporter for public use? More...
 
static getDescription ()
 Return a short description of the exporter. More...
 

Static Protected Member Functions

static toStringDo ($languages)
 
- Static Protected Member Functions inherited from Gettext\Languages\Exporter\Exporter
static toStringDo ($languages)
 Convert a list of Language instances to string. More...
 

Detailed Description

Definition at line 6 of file Po.php.

Member Function Documentation

◆ getDescription()

static Gettext\Languages\Exporter\Po::getDescription ( )
static
See also
Exporter::getDescription

Definition at line 27 of file Po.php.

28  {
29  return 'Build a string to be used for gettext .po files';
30  }

◆ toStringDo()

static Gettext\Languages\Exporter\Po::toStringDo (   $languages)
staticprotected
See also
Exporter::toStringDo

Definition at line 11 of file Po.php.

References array.

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  }
Create styles array
The data for the language used.

The documentation for this class was generated from the following file: