function i18nviews_locale_source in Internationalization Views 7.3
Find the location source for a certain expression.
3 calls to i18nviews_locale_source()
- i18nviews_handler_argument_taxonomy_term_name::query in includes/
i18nviews_handler_argument_taxonomy_term_name.inc - Build the query based upon the formula.
- i18nviews_handler_filter_taxonomy_term_name::op_equal in includes/
i18nviews_handler_filter_taxonomy_term_name.inc - i18nviews_plugin_argument_validate_i18n_taxonomy_term::validate_argument in includes/
i18nviews_plugin_argument_validate_i18n_taxonomy_term.inc
File
- ./
i18nviews.module, line 110 - Views support for Internationalization (i18n) package
Code
function i18nviews_locale_source($translation, $textgroup, $language = NULL) {
if (!isset($language)) {
$language = $GLOBALS['language']->language;
}
$select = db_select('locales_source', 'ls');
$select
->innerJoin('locales_target', 'lt', '(ls.lid = lt.lid AND lt.translation = :translation AND lt.language = :language AND ls.textgroup = :textgroup )', array(
':translation' => $translation,
':language' => $language,
':textgroup' => $textgroup,
));
$select
->fields('ls', array(
'source',
));
return $select
->execute()
->fetchObject();
}