function i18nstrings_context_query in Internationalization 6
Get query conditions for this context.
3 calls to i18nstrings_context_query()
- i18nstrings_get_source in i18nstrings/
i18nstrings.module - Get source string provided a string context.
- i18nstrings_get_string in i18nstrings/
i18nstrings.module - Get string for a language.
- i18nstrings_get_translation in i18nstrings/
i18nstrings.module - Get translation from the database. Full object with input format.
File
- i18nstrings/
i18nstrings.module, line 803 - Internationalization (i18n) package - translatable strings.
Code
function i18nstrings_context_query($context, $alias = 's') {
$where = array(
"{$alias}.textgroup = '%s'",
"{$alias}.location = '%s'",
);
$args = array(
$context->textgroup,
$context->location,
);
if (!empty($context->source)) {
$where[] = "s.source = '%s'";
$args[] = $context->source;
}
return array(
$where,
$args,
);
}