Codex

Function Reference/translate

Contents

Description

Retrieves the translation of $text. If there is no translation, or the domain isn't loaded the original text is returned.

Usage

<?php translate$text$domain ?>

Parameters

$text
(string) (required) Text to translate.
Default: None
$domain
(string) (optional) Domain to retrieve the translated text.
Default: 'default'

Return Values

(string) 
Translated text

Examples

Notes

  • See __() Don't use translate directly, use __()
  • Uses: apply_filters() Calls 'gettext' on domain translated text with the untranslated text as second parameter.

Change Log

Since: 2.2.0

Source File

translate() is located in wp-includes/l10n.php.

Related