function lingotek_admin_index_plural_targets in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.admin.inc \lingotek_admin_index_plural_targets()
- 7.4 lingotek.admin.inc \lingotek_admin_index_plural_targets()
- 7.5 lingotek.admin.inc \lingotek_admin_index_plural_targets()
1 string reference to 'lingotek_admin_index_plural_targets'
File
- ./
lingotek.admin.inc, line 1094
Code
function lingotek_admin_index_plural_targets(&$context = NULL) {
if ($context) {
$context['message'] = t('Indexing translation targets to preserve plurality');
}
$plurals = db_select('locales_target', 't')
->fields('t', array(
'lid',
'plid',
'plural',
))
->condition('plid', 0, '!=')
->execute()
->fetchAll();
if ($plurals) {
$plural_map = variable_get('lingotek_config_plural_mapping', array());
foreach ($plurals as $p) {
$plural_map[$p->lid] = array(
'plid' => $p->plid,
'plural' => $p->plural,
);
}
variable_set('lingotek_config_plural_mapping', $plural_map);
}
}