You appear to be a bot. Output may be restricted
Description
Register some text for localization as deferred translatable text
Part of the internationalization process is to ensure text is translatable. We use bw_dtt()
to register strings of text destined for internationalization. This enables makepot/makeoik to extract the strings into the plugin's .pot file from which localized versions can be created.
Note: This does not support the context
Usage
$string = bw_dtt( $key, $text, $context );
Parameters
- $key
- ( string ) required – the lookup key for the text
- $text
- ( string ) optional – the text to be translated. If null then the $key is used
- $context
- ( string ) optional – the text domain
Returns
string the key – which may be assigned to a variable and used elsewhere
Source
File name: oik-bwtrace/libs/bobbfunc.php
Lines:
1 to 15 of 15
function bw_dtt( $key, $text=null, $context=null ) { global $bw_dtt; if ( $context == null ) { $context = bw_context( "textdomain"); } if ( $text == null ) { $text = $key; } $bw_dtt[ $key ] = $text; if ( $context ) { $bw_dtt[ $key ][$context] = $text; } //bw_trace2( $bw_dtt ); return( $key ); }