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:
  • 4: .
  • 6: .

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.

Related Functions

signup_get_available_languages, get_available_post_statuses, wp_get_available_translations, get_editable_roles, get_all_page_ids

Top Google Results

User discussions

wpseek mobile