I want to localise vocabulary fields especially description field. Does it exist some function like i18n_taxonomy_localize_terms( taxonomy_term_load($tid)
for taxonomy_vocabulary_load($vid)
. Or maybe some different method.
Thanks
I want to localise vocabulary fields especially description field. Does it exist some function like i18n_taxonomy_localize_terms( taxonomy_term_load($tid)
for taxonomy_vocabulary_load($vid)
. Or maybe some different method.
Thanks
You can localize the taxonomy description field out-of-the-box with the Entity Translation module. While Entity Translation can be used in combination with the i18n suite of modules, note that you cannot use Entity Translation for taxonomy in conjunction with the i18n Taxonomy translation module; you must select one or the other.
If you use Entity Translation, to translate the taxonomy term names you will also need the Title module.
I made simple function. I don't know is it properly but it do job for me. Where $lid Unique identifier of this string, you can find it on page Configuration » Regional and language » Translate interface, edit link.
function t_lid($lid,$lang){
$translation=db_query('SELECT l.translation FROM {locales_target} l WHERE l.lid = :lid AND l.language=:lang', array(':lid' => $lid,':lang'=>$lang))->fetchField();
return $translation;
}
I hate to install module for one simple thing :)