do_action( 'wpml_show_package_language_ui', array $package, array $args )
Description
Outputs the UI to display a language information box in admin screens of content that was registered for translation as a string package*. It also shows the current state of any translations.
*String translation packages are registered with wpml_register_string and their translations retrieved with wpml_translate_string
Note: This hook requires the WPML String Translation module
Arguments
$packagearrayRequiredThe package object. Array keys must match the following WPML_Package fields and will be the same for all texts sent to translation for an object:kindA free text to identify the package object. Must be the same for all packages of the same type. i.e. ‘Gravity Form’ or ‘Layout’nameA name to identify the set of strings with. Must be unique for each package of the same type such as an IDtitleA humanly readable title for the package. Must be different for each package of the same type.edit_linkLink to edit this set of strings (it can be an empty string)view_linkLink to view this set of strings (it can be an empty string)
$argsarrayOptionalArguments to control the output$show_titleboolWill hide/show the “WPML Translation” title in the box. Defaults to TRUE$show_descriptionboolWill hide/show the “Language of this{package_kind}is{language_name}” Defaults to TRUE$show_statusboolWill hide/show the translation status” Defaults to TRUE$show_linkboolWill hide/show the link which leads to the translation dashboard. Defaults to TRUE$title_tagstringThe HTML Tag to use for the box title. Defaults to ‘h2’$status_container_tagstringThe HTML Tag to use for translation status container. Defaults to ‘p’$main_container_attributesarrayArray ofkeys->valuesto add to the main container (for CSS and/or js) Defaults to an empty array$status_container_attributesarrayArray ofkeys->valuesto add to the status container (for CSS and/or js) Defaults toarray( 'style' => 'padding-left: 10px' )
Example Usage
$package = array( 'kind' => 'Layout', 'name' => 'contact-us'); do_action('wpml_show_package_language_ui', $package);