ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Language\ComponentTranslation\LanguageFileDirectory Interface Reference

A directory of language files with a path and a prefix for them. More...

+ Inheritance diagram for ILIAS\Language\ComponentTranslation\LanguageFileDirectory:
+ Collaboration diagram for ILIAS\Language\ComponentTranslation\LanguageFileDirectory:

Public Member Functions

 getPrefix ()
 
 getPath ()
 
 getSuffix ()
 
 isLocal ()
 

Detailed Description

A directory of language files with a path and a prefix for them.

It models how ILIAS currently handles translations: files must be named (e.g. ilias_en.lang) and structured accordingly.

  • MainLanguageFileDirectory: only for the Language component, the /lang directory; empty prefix, as the files already carry component prefixes (variables of three parts).
  • ComponentLanguageFileDirectory: for a component; the prefix is the component prefix (e.g. "file"), the path relative to the component directory (usually lang/); entries of two parts (like plugins before).

A contributed ComponentLanguageFileDirectory is also how a module opts into the PO/MO migration (see MigratedLanguageFileSync, ShippedTranslationsBuild, TranslationGettextRepository): getPath() then also locates its shipped <prefix>.pot/<prefix>_<lang>.po, the per-installation overlay lives in CLIENT_DATA_DIR lang/<prefix>/<lang>/ (see MigratedLanguageFilePaths). The same directory object serves both conventions.

Definition at line 37 of file LanguageFileDirectory.php.

Member Function Documentation

◆ getPath()

◆ getPrefix()

◆ getSuffix()

◆ isLocal()


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