Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The current riddler module for 7.x does not allow translations of questions/answers in a multi-language site.
The attached patch sends all questions/answers to the t()
function, that allows 1:1 translations via the /admin/config/regional/translate/translate
page. Of course the best approach would be to integrate i18n directly in the riddler form, but for now this simple way works for my humble needs and might work for others as well.
Comment | File | Size | Author |
---|---|---|---|
riddler.translation.patch | 1.24 KB | ptaff | |
Comments
Comment #1
jasom CreditAttribution: jasom commentedNice works, thanks.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedThis patch works fine for me. I have tested it thoroughly on one 2-langauge site, and will test on more massively-multilingual sites soon. Thank you. Please merge this patch with the stable release.
Comment #3
zionduc CreditAttribution: zionduc commentedIt's not working for me.
I've added a new question/answer pair, cleared cache, but strings missing at /admin/config/regional/translate/translate page.
Is there any dependency to make this patch working?
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commented@zionduc - are you searching for the exact case-sensitive string "Do you like SPAM?" for the translations of the default question? - it is working for me and I have tested this extensively.
However when I add a new question and answer, I do not find it anywhere in the translate system, and of course, it isn't in the variables list either. So, the patch is missing something as regards added question / answer pairs.
Comment #5
simon147 CreditAttribution: simon147 commentedWould it be possible to integrate this patch into the main file of this module?
Comment #6
bglogo CreditAttribution: bglogo commentedThe pactch works fine, many thanks. It's good users to know that Riddler questions should be generated again to become possible for translation.
Comment #7
simon147 CreditAttribution: simon147 commentedInstalled this and - like others - can't find my specific questions under /admin/config/regional/translate/translate
Comment #8
jasom CreditAttribution: jasom commented@simon147:
- load string in your localized version of the site
- refresh all strings (tab in /admin/config/regional/translate/)
- make sure you have enabled all necessary i18n submodules
Comment #9
pifagorLook good
Comment #10
pifagorComment #12
alex_optimComment #13
alex_optimComment #14
alex_optim