get_available_languages


get_available_languages ( $dir = null )

Parameters:
  • (string) $dir A directory to search for language files. Default WP_LANG_DIR.
Returns:
  • (array) An array of language codes or an empty array if no languages are present. Language codes are formed by stripping the .mo extension from the language file names.
Defined at:
Change Log:
  • 4: .

Description

Get all available languages based on the presence of *.mo 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