function _i18ntaxonomy_translate_terms in Internationalization 5.2
Same name and namespace in other branches
- 5.3 contrib/i18ntaxonomy.module \_i18ntaxonomy_translate_terms()
- 5 contrib/i18ntaxonomy.module \_i18ntaxonomy_translate_terms()
2 calls to _i18ntaxonomy_translate_terms()
- i18ntaxonomy_nodeapi in contrib/
i18ntaxonomy.module - Implementation of hook_nodeapi()
- i18ntaxonomy_views_handler_field_allterms in contrib/
i18ntaxonomy.module - Field handler for taxonomy term fields
File
- contrib/
i18ntaxonomy.module, line 227 - Internationalization (i18n) package - taxonomy term translation
Code
function _i18ntaxonomy_translate_terms(&$terms) {
if ($translate = variable_get('i18ntaxonomy_vocabularies', array())) {
foreach (array_keys($terms) as $tid) {
if ($translate[$terms[$tid]->vid]) {
$terms[$tid]->name = t($terms[$tid]->name);
}
}
}
}