Blocks inserted via a Display Suite block field are not translated. Display Suite shows the original language no matter the user's current language. The block I tested is translating correctly on the same page using the standard block system.
Any ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 1402500-16.patch | 4.53 KB | swentel |
| #13 | 1402500-13.patch | 3.17 KB | swentel |
| #11 | 1402500-11.patch | 3.11 KB | swentel |
| #9 | 1402500-9.patch | 3.14 KB | swentel |
| #1 | 1402500-1.patch | 720 bytes | swentel |
Comments
Comment #1
swentel commentedCan you test this patch ?
Comment #2
dimitriseng commentedHi, thanks for the patch but I think that this needs more work.
Using D7.12 and DS7.x-1.5. Site with 2 languages, the default is not English.
I have tested the following:
* Block with translation enabled
- Block Title shown in correct language => FAIL
- Block Body shown in correct language => PASS
* Block with translation disabled and assigned to a specific language
- Displayed in the language assigned to the block => PASS
- It should not be displayed when the user is using a language that is not assigned to the block => FAIL (the block is shown for all languages, even for the ones that are not assigned to the block)
Can you please check the failed cases? Thank you.
Comment #3
xcel commentedHi, I have the same issue. Is there any news about this topic ?
Thks in advance
Comment #4
rtdean93 commentedI also have the same issue.
Block content is being translated, but not the title.
Comment #5
swentel commentedCould test this with a 'dynamic field' and doing this throught a ctools content type ? If that works, I'm not going to patch this, it's really to hard to get all use cases done :)
Comment #6
dimitriseng commentedHi, I think the the use cases I listed in #2 are very basic for multillingual sites and I think that these should work out of the box. The patch is in #1 is very close to providing the solution, please see my comments in #2. Thank you.
Comment #7
aspilicious commentedMoving to 7.2
Comment #8
swentel commentedMmm well that would mean we'd have to copy some more functionality from i18n_block_block_list_alter() as well, which will do a query - which it would do as well if it was a block, so there's no penalty there I guess. Will investigate more.
Comment #9
swentel commentedNew patch - horrible how i18n works, but oh well. Should work fine now in all cases I think.
Comment #10
swentel commentedOne second, tests are failing, will get back soon.
Comment #11
swentel commentedBetter patch.
Comment #12
swentel commentedNote, patch can be tested against 7.x-1.x branch as well - should work fine there.
Comment #13
swentel commentedUpdated patch and commited and pushed.
- Edit- used a wrong variable in the patch, this has been updated already in the repository.
Comment #15
RollWhisTler commentedIt doesn't work for me in the latest stable version... is it only available on dev branch? it should since is more than a year old patch...
Regular block field on a view mode, body gets translated, not the title :_(
Comment #16
swentel commentedYou're right, I complete rewrote how blocks are rendered. This now works finally.
All alters are now taken care of as well (finally) - due to #1898334: Block hooks bypassed when using block fields