get_available_languages
get_available_languages ( $dir = null )
Parameters:- (string) dir A directory to search for language files. Default WP_LANG_DIR.
Returns:- (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.
Defined at:Change Log: - Introduced in WordPress: 3.0.0
- Deprecated in WordPress: —
Description
Gets all available languages based on the presence of *.mo and *.l10n.php files in a given directory.The default directory is WP_LANG_DIR.