apply_filters( ‘translations_api_result’, array|WP_Error $res, string $type, object $args )

In this article

Filters the Translation Installation API response results.

Parameters

$resarray|WP_Error
On success an associative array of translations, WP_Error on failure.
  • translations array
    List of translations, each an array of data.
    • ...$0 array
      • language string
        Language code.
      • version string
        WordPress version.
      • updated string
        Date the translation was last updated, in MySQL datetime format.
      • english_name string
        English name of the language.
      • native_name string
        Native name of the language.
      • package string
        URL to download the translation package.
      • iso string[]
        Array of ISO language codes.
      • strings array
        Array of translated strings used in the installation process.
        }
$typestring
The type of translations being requested.
$argsobject
Translation API arguments.

Source

return apply_filters( 'translations_api_result', $res, $type, $args );

Changelog

VersionDescription
4.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.