You are here

function _i18ntaxonomy_term_set_lang in Internationalization 6

Set language for a term. If no language set trid to 0 too.

1 call to _i18ntaxonomy_term_set_lang()
i18ntaxonomy_taxonomy in i18ntaxonomy/i18ntaxonomy.module
Implementation of hook_taxonomy().

File

i18ntaxonomy/i18ntaxonomy.module, line 638
i18n taxonomy module

Code

function _i18ntaxonomy_term_set_lang($tid, $langcode) {
  if ($langcode) {
    db_query("UPDATE {term_data} SET language='%s' WHERE tid = %d", $langcode, $tid);
  }
  else {
    db_query("UPDATE {term_data} SET language = '', trid = 0 WHERE tid = %d", $tid);
  }
}