The Page title is not translatable. That's because of these lines:
#415
drupal_set_title(variable_get('faq_title', 'Frequently Asked Questions'));
#530
$title = variable_get('faq_title', 'Frequently Asked Questions');
I replaced them with this code:
#415
drupal_set_title(t(variable_get('faq_title', 'Frequently Asked Questions')));
#530
$title = t(variable_get('faq_title', 'Frequently Asked Questions'));
I configured the FAQ to show the categories online, with the answer hidden. However, when changing the language, the categories don't change with the translation. I had installed and enabled i18ntaxonomy.
I think the function
function faq_tt($string_id, $default, $language = NULL) {}
is the problem, because it returns always the default value, because tt() function cannot be found.
In my case, inside faq_page, around line #561, I used
i18n_taxonomy_localize_terms(taxonomy_get_tree($vid, 0, 1, TRUE));
instead of
taxonomy_get_tree($vid, 0, 1, TRUE);
Hope this helps to make this module better.
Thanks again
Comments
Comment #1
jief commentedHere is a first patch. It's not complete.
Comment #2
jief commentedTranslate sub categories too
Comment #3
jief commentedComment #4
olafskiTested the patch in #2 which works fine for categories. (I don't use sub categories on the site.)
Comment #5
podarokbot
Comment #6
cpat commentedHello,
I have updated the patch for the last module version 7.x-2.x-dev.
I also completed it, to display the translated term description.
Comment #8
podarok7.x-2.x - is a full rewrite so please use 7.x-1.x for this
Comment #9
sanchiz commentedComment #10
danyg commentedI have tested patch #2. It works fine, thanks.
Comment #11
paravibe commentedComment #12
paravibe commentedRerolled + added translate for description.
Comment #13
alex liannoy commentedLooks fine.
Comment #14
alex liannoy commentedComment #15
podarokthanks, merged