\MatthiasWeb\RealMediaLibraryLocalization

i18n management for backend and frontend.

Summary

Methods
Properties
Constants
getPluginConstantPrefix()
getLanguageFromFile()
load_textdomain_mofile()
hooks()
getPotLanguages()
$PACKAGE_INFO_FRONTEND
$PACKAGE_INFO_BACKEND
No constants found
getPackageInfo()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$PACKAGE_INFO_FRONTEND

$PACKAGE_INFO_FRONTEND :

Type

$PACKAGE_INFO_BACKEND

$PACKAGE_INFO_BACKEND :

Type

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

Returns

string

getLanguageFromFile()

getLanguageFromFile(string  $file)

Obtain language key from a file name.

Parameters

string $file

load_textdomain_mofile()

load_textdomain_mofile(string  $mofile,string  $domain)

Never load `.mo` files from `wp-content/plugins/languages` as we do manage all our translations ourself.

TODO: make this configurable per plugin?

Parameters

string $mofile
string $domain

hooks()

hooks()

Add filters to WordPress runtime.

getPotLanguages()

getPotLanguages()

Get the languages which are available in the POT file. Why multiple? Imagine you want to use the pot file for `en_US` and `en_GB`. This can be useful for the `@devowl-wp/multilingual` package, especially the `TemporaryTextDomain` feature.

getPackageInfo()

getPackageInfo(string  $type): array<mixed,string>

Get the directory where the languages folder exists.

Parameters

string $type

Returns

array<mixed,string>