W3cubDocs

/WordPress

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

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

      Version Description
      4.0.0 Introduced.

    User Contributed Notes

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

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/translations_api_result