First of all, thanks for this great useful module. I used it these days to create a FAQ in two languages. I found some problems:

  1. 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'));
    
  2. 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

jief’s picture

Here is a first patch. It's not complete.

jief’s picture

Translate sub categories too

jief’s picture

Status: Active » Needs review
olafski’s picture

Status: Needs review » Reviewed & tested by the community

Tested the patch in #2 which works fine for categories. (I don't use sub categories on the site.)

podarok’s picture

Version: 7.x-1.0-rc2 » 7.x-1.x-dev
Issue summary: View changes
Status: Reviewed & tested by the community » Needs review

bot

cpat’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
StatusFileSize
new1.9 KB

Hello,

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.

Status: Needs review » Needs work

The last submitted patch, 6: multilingual_faq_title_and_categories-1682676-6.patch, failed testing.

podarok’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev

7.x-2.x - is a full rewrite so please use 7.x-1.x for this

sanchiz’s picture

Assigned: Unassigned » sanchiz
danyg’s picture

I have tested patch #2. It works fine, thanks.

paravibe’s picture

Assigned: sanchiz » paravibe
Issue tags: +dcuacs2015
paravibe’s picture

Assigned: paravibe » Unassigned
Status: Needs work » Needs review
StatusFileSize
new3.11 KB

Rerolled + added translate for description.

alex liannoy’s picture

Looks fine.

alex liannoy’s picture

Status: Needs review » Reviewed & tested by the community
podarok’s picture

Status: Reviewed & tested by the community » Fixed

thanks, merged

  • podarok committed f9716a7 on 7.x-1.x authored by paravibe
    Issue #1682676 by jief, paravibe, cpat, Lianik: Multilingual FAQ title...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.