def term_translation_show(context, data_dict):
 model = context['model']
 trans_table = model.term_translation_table
 q = _select([trans_table])
 if ('terms' not in data_dict):
  raise ValidationError({'terms': 'terms not in data'})
 terms = _get_or_bust(data_dict, 'terms')
 if isinstance(terms, basestring):
  terms = [terms]
 if terms:
  q = q.where(trans_table.c.term.in_(terms))
 if ('lang_codes' in data_dict):
  lang_codes = _get_or_bust(data_dict, 'lang_codes')
  if isinstance(lang_codes, basestring):
   lang_codes = [lang_codes]
  q = q.where(trans_table.c.lang_code.in_(lang_codes))
 conn = model.Session.connection()
 cursor = conn.execute(q)
 results = []
 for row in cursor:
  results.append(_table_dictize(row, context))
 return results

def term_translation_show ( context , data_dict ) : model = context [ 'model' ] trans_table = model . term_translation_table q = _select ( [ trans_table ] ) if ( 'terms' not in data_dict ) : raise ValidationError ( { 'terms' : 'terms not in data' } ) terms = _get_or_bust ( data_dict , 'terms' ) if isinstance ( terms , basestring ) : terms = [ terms ] if terms : q = q . where ( trans_table . c . term . in_ ( terms ) ) if ( 'lang_codes' in data_dict ) : lang_codes = _get_or_bust ( data_dict , 'lang_codes' ) if isinstance ( lang_codes , basestring ) : lang_codes = [ lang_codes ] q = q . where ( trans_table . c . lang_code . in_ ( lang_codes ) ) conn = model . Session . connection ( ) cursor = conn . execute ( q ) results = [ ] for row in cursor : results . append ( _table_dictize ( row , context ) ) return results
return the translations for the given term(s) and language(s) .