Core Function
View Source on Trac ↗ get_available_languages()
get_available_languages( mixed $dir = null ) Gets all available languages based on the presence of *.mo and *.l10n.php files in a given directory.
Parameters 1 required
| Name / Type | Description |
|---|---|
| string | $dir A directory to search for language files. Default WP_LANG_DIR. Required |
Return Value
(string[])
string[] An array of language codes or an empty array if no languages are present.
Language codes are formed by stripping the file extension from the language file names.
Function Information
Since Version
3.0.0
Source File
wp-includes/l10n.php
Advertisement