Filter: DevOwl/Multilingual/TranslateInput

apply_filters( 'DevOwl/Multilingual/TranslateInput', $translation, $input, $sourceLocale, $targetLocale, $domain, $context, $instance ) → {string}

Get a translation for a given string. This allows you to translate strings programmatically for example by looking up strings in database.

Parameters:
Name Type Description
$translation string

Without translation, it is null. When a translation got found, return [source_content, target_content]

$input string
$sourceLocale string

Source locale in WordPress-compatible format

$targetLocale string

Target locale in WordPress-compatible format

$domain string

The original text domain for which we try to get a translation

$context string
$instance AbstractLanguagePlugin
Since:
  • 3.6.4
Returns:
Type
string