WP_Translation_File::translate
Translates a given string.
Метод класса: WP_Translation_File{}
Хуков нет.
Возвращает
false|Строку. Translation(s) on success, false otherwise.
Использование
$WP_Translation_File = new WP_Translation_File(); $WP_Translation_File->translate( $text );
- $text(строка) (обязательный)
- String to translate.
Список изменений
| С версии 6.5.0 | Введена. |
Код WP_Translation_File::translate() WP Translation File::translate WP 7.0.4
public function translate( string $text ) {
if ( ! $this->parsed ) {
$this->parse_file();
}
return $this->entries[ $text ] ?? false;
}