11 $dir = self::getDirectory();
16 $fileName =
"$dir/" . self::getFilename(
$code );
17 if ( is_readable( $fileName ) ) {
18 $data = FormatJson::decode( file_get_contents( $fileName ),
true );
19 $cache[
'messages'] = array_merge(
$cache[
'messages'], $data );
29 $dir = self::getDirectory();
34 $codeSequence = array_merge( [
$code ],
$cache[
'fallbackSequence'] );
35 foreach ( $codeSequence as $csCode ) {
36 $fileName =
"$dir/" . self::getFilename( $csCode );
63 return "l10nupdate-$language.json";
$wgCacheDirectory
Directory for caching data in the local filesystem.
Class for caching the contents of localisation files, Messages*.php and *.i18n.php.
static getDirectory()
Returns a directory where updated translations are stored.
static onRecache(LocalisationCache $lc, $code, array &$cache)
Hook: LocalisationCacheRecache.
static onRecacheFallback(LocalisationCache $lc, $code, array &$cache)
Hook: LocalisationCacheRecacheFallback.
static getFilename( $language)
Returns a filename where updated translations are stored.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable & $code