wp_set_script_translations


wp_set_script_translations ( $handle, $domain = 'default', $path = '' )

Parameters:
  • (string) handle Script handle the textdomain will be attached to.
  • (string) domain Optional. Text domain. Default 'default'.
  • (string) path Optional. The full file path to the directory containing translation files.
See:
  • WP_Scripts::set_translations()
Returns:
  • (bool) True if the text domain was successfully localized, false otherwise.
Defined at:
Change Log:
  • 5: .

Description

Sets translated strings for a script.Works only if the script has already been registered.

Related Functions

load_script_translations, wp_get_installed_translations, wp_get_available_translations, _get_path_to_translation, wp_get_script_tag

Top Google Results

User discussions

wpseek mobile