function lingotek_admin_save_queued_strings in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 lingotek.admin.inc \lingotek_admin_save_queued_strings()
- 7.5 lingotek.admin.inc \lingotek_admin_save_queued_strings()
- 7.6 lingotek.admin.inc \lingotek_admin_save_queued_strings()
1 call to lingotek_admin_save_queued_strings()
File
- ./
lingotek.admin.inc, line 762
Code
function lingotek_admin_save_queued_strings() {
$plural_map = variable_get('lingotek_config_plural_mapping', array());
global $_potx_strings, $_potx_install;
foreach ($_potx_strings as $k => $v) {
// handle format_plural
if (strpos($k, "\0")) {
list($singular, $plural) = explode("\0", $k);
locale($singular, $context = NULL, $langcode = 'und');
$single_lid = LingotekConfigChunk::getLidBySource($singular);
locale($plural, $context = NULL, $langcode = 'und');
$plural_lid = LingotekConfigChunk::getLidBySource($plural);
$plural_map[$plural_lid] = array(
'plid' => $single_lid,
'plural' => 1,
);
}
else {
// handle regular t-function content
locale($k, $context = NULL, $langcode = 'und');
}
}
// TODO: do something with the _potx_install strings
variable_set('lingotek_config_plural_mapping', $plural_map);
$_potx_strings = array();
$_potx_install = array();
}