function _l10n_client_dom_strings in Localization client 7
Same name and namespace in other branches
- 5 l10n_client.module \_l10n_client_dom_strings()
- 6.2 l10n_client.module \_l10n_client_dom_strings()
- 6 l10n_client.module \_l10n_client_dom_strings()
Helper function for the string list DOM tree
1 call to _l10n_client_dom_strings()
- l10n_client_page_alter in ./
l10n_client.module - Implement hook_page_alter().
File
- ./
l10n_client.module, line 324 - Localization client. Provides on-page translation editing.
Code
function _l10n_client_dom_strings($strings) {
$output = '';
foreach ($strings as $values) {
list($source, $target, $textgroup, $context) = $values;
$source = $source === TRUE ? '' : htmlspecialchars($source, ENT_NOQUOTES, 'UTF-8');
$target = $target === TRUE ? '' : htmlspecialchars($target, ENT_NOQUOTES, 'UTF-8');
$context = htmlspecialchars($context, ENT_NOQUOTES, 'UTF-8');
$output .= "<div><span class='source'>{$source}</span><span class='target'>{$target}</span><span class='textgroup'>{$textgroup}</span><span class='context'>{$context}</span></div>";
}
return "<div id='l10n-client-data'>{$output}</div>";
}