[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/includes/ -> translation-install.php (summary)

WordPress Translation Installation Administration API

File Size: 277 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 5 functions

  translations_api()
  wp_get_available_translations()
  wp_install_language_form()
  wp_download_language_pack()
  wp_can_install_language_pack()

Functions
Functions that are not part of a class:

translations_api( $type, $args = null )   X-Ref
Retrieve translations from WordPress Translation API.

return: array|WP_Error On success an associative array of translations, WP_Error on failure.
param: string       $type Type of translations. Accepts 'plugins', 'themes', 'core'.
param: array|object $args Translation API arguments. Optional.
since: 4.0.0

wp_get_available_translations()   X-Ref
Get available translations from the WordPress.org API.

return: array[] Array of translations, each an array of data, keyed by the language. If the API response results
since: 4.0.0

wp_install_language_form( $languages )   X-Ref
Output the select form for the language selection on the installation screen.

param: array[] $languages Array of available languages (populated via the Translation API).
since: 4.0.0

wp_download_language_pack( $download )   X-Ref
Download a language pack.

return: string|false Returns the language code if successfully downloaded
param: string $download Language code to download.
since: 4.0.0

wp_can_install_language_pack()   X-Ref
Check if WordPress has access to the filesystem without asking for
credentials.

return: bool Returns true on success, false on failure.
since: 4.0.0



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1