Uses
Uses | Description |
---|---|
wp-includes/pomo/entry.php: Translation_Entry::__construct() | |
wp-includes/pomo/translations.php: Translations::translate_entry() |
(string) (Required)
(string) (Optional)
Default value: null
(string)
File: wp-includes/pomo/translations.php
function translate( $singular, $context = null ) { $entry = new Translation_Entry( array( 'singular' => $singular, 'context' => $context, ) ); $translated = $this->translate_entry( $entry ); return ( $translated && ! empty( $translated->translations ) ) ? $translated->translations[0] : $singular; }
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/translations/translate