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?

Comments

swentel’s picture

Status: Active » Needs review
StatusFileSize
new720 bytes

Can you test this patch ?

dimitriseng’s picture

Version: 7.x-1.4 » 7.x-1.5
Status: Needs review » Needs work
Issue tags: +i18n compatibility

Hi, 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.

xcel’s picture

Hi, I have the same issue. Is there any news about this topic ?
Thks in advance

rtdean93’s picture

I also have the same issue.

Block content is being translated, but not the title.

swentel’s picture

Status: Needs work » Postponed (maintainer needs more info)

Could 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 :)

dimitriseng’s picture

Hi, 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.

aspilicious’s picture

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

Moving to 7.2

swentel’s picture

Mmm 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.

swentel’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new3.14 KB

New patch - horrible how i18n works, but oh well. Should work fine now in all cases I think.

swentel’s picture

Status: Needs review » Needs work

One second, tests are failing, will get back soon.

swentel’s picture

Status: Needs work » Needs review
StatusFileSize
new3.11 KB

Better patch.

swentel’s picture

Note, patch can be tested against 7.x-1.x branch as well - should work fine there.

swentel’s picture

Status: Needs review » Fixed
StatusFileSize
new3.17 KB

Updated patch and commited and pushed.

- Edit- used a wrong variable in the patch, this has been updated already in the repository.

Status: Fixed » Closed (fixed)

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

RollWhisTler’s picture

Version: 7.x-2.x-dev » 7.x-2.4
Status: Closed (fixed) » Needs work

It 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 :_(

swentel’s picture

Status: Needs work » Closed (fixed)
StatusFileSize
new4.53 KB

You'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