MediaWiki  1.32.5
LocalisationUpdate Class Reference

Class for localization update hooks and static methods. More...

Classes

class  FinderTest
 \LocalisationUpdate\Finder More...
 
class  JSONReader
 Reads MediaWiki JSON i18n files. More...
 
class  JSONReaderTest
 \LocalisationUpdate\JSONReader More...
 
interface  Reader
 Interface for file readers. More...
 
class  ReaderFactory
 Constructs readers for files based on the names. More...
 
class  ReaderFactoryTest
 \LocalisationUpdate\ReaderFactory More...
 
class  Updater
 Executes the localisation update. More...
 
class  UpdaterTest
 \LocalisationUpdate\Updater More...
 

Static Public Member Functions

static getDirectory ()
 Returns a directory where updated translations are stored. More...
 
static getFilename ( $language)
 Returns a filename where updated translations are stored. More...
 
static onRecache (LocalisationCache $lc, $code, array &$cache)
 Hook: LocalisationCacheRecache. More...
 
static onRecacheFallback (LocalisationCache $lc, $code, array &$cache)
 Hook: LocalisationCacheRecacheFallback. More...
 

Detailed Description

Class for localization update hooks and static methods.

Definition at line 6 of file LocalisationUpdate.php.

Member Function Documentation

◆ getDirectory()

static LocalisationUpdate::getDirectory ( )
static

Returns a directory where updated translations are stored.

Returns
string|false False if not configured.
Since
1.1

Definition at line 57 of file LocalisationUpdate.php.

References $wgCacheDirectory.

Referenced by Update\execute(), onRecache(), and onRecacheFallback().

◆ getFilename()

static LocalisationUpdate::getFilename (   $language)
static

Returns a filename where updated translations are stored.

Parameters
string$languageLanguage tag
Returns
string
Since
1.1

Definition at line 70 of file LocalisationUpdate.php.

Referenced by Update\execute(), onRecache(), and onRecacheFallback().

◆ onRecache()

static LocalisationUpdate::onRecache ( LocalisationCache  $lc,
  $code,
array $cache 
)
static

Hook: LocalisationCacheRecache.

Parameters
LocalisationCache$lc
string$code
array&$cache
Returns
true

Definition at line 36 of file LocalisationUpdate.php.

References $cache, $code, as, getDirectory(), and getFilename().

◆ onRecacheFallback()

static LocalisationUpdate::onRecacheFallback ( LocalisationCache  $lc,
  $code,
array $cache 
)
static

Hook: LocalisationCacheRecacheFallback.

Parameters
LocalisationCache$lc
string$code
array&$cache
Returns
true

Definition at line 14 of file LocalisationUpdate.php.

References $cache, $code, FormatJson\decode(), getDirectory(), and getFilename().


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