Translations::translate( string $singular, string $context = null )


Description Description


Parameters Parameters

$singular

(string) (Required)

$context

(string) (Optional)

Default value: null


Top ↑

Return Return

(string)


Top ↑

Source Source

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;
		}


Top ↑

User Contributed Notes User Contributed Notes

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