Block Type Names not translated?

Permalink 1 user found helpful
Hi together,

it seems to me that in my installations the block type names are not translated correctly or are not translated at all.

So if I want to add a new block to an area there is always the possible block type list in english although there are the correct translated terms in the corresponding .mo files

And the right functions in the controllers - e.g.
public function getBlockTypeName() {
return t("Content");
}

All the other translation works fine - only block type names and descriptions don't.

Has/Had anyone else this problem and how can it be solved?

Thanks in advance for any advice!

 
bsasChana replied on at Permalink Reply
Hello again,
can somebody please confirm me at least this behavior - the not-translation of block type names and descriptions - as normal or wrong, so I can check where to search next.

Thanks
sentido replied on at Permalink Reply
sentido
Yep - same thing here.
bsasChana replied on at Permalink Best Answer Reply
Hello sentido,
if you're interested in a solution try this:

copy /httpdocs/concrete/models/block_types.php to httpdocs/models - so you won't alter the original core files

I added there in function BlockTypeList() (about line 42)
the following

$bt->btName = t($bt->btName);               $bt->btDescription = t($bt->btDescription);


Hope it works for you!
bsasChana
sentido replied on at Permalink Reply
sentido
Worked like a charm :o)

Thank you!
thuic replied on at Permalink Reply
thuic
Great tip. I solved above mentioned problem after upgrading from 5.4.2. to 5.4.2.2. But it's not working for me on fresh install of 5.4.2.2.
tsilbermann replied on at Permalink Reply
tsilbermann
adding
$bt->btName = t($bt->btName);
$bt->btDescription = t($bt->btDescription);


didn't work for me in an updated 5.4.2.2 version.

I have the same problem (no block-name/description -translation) on an 4.5.2.1 installation
thuic replied on at Permalink Reply
thuic
Hi,
My translations of the names and descriptions of block types are finally working!

Try: go to the Sidewide settings/Debug and refresh database tables.
tsilbermann replied on at Permalink Reply
tsilbermann
Could anybody solve this for the current version (5.4.2.2)?
bsasChana replied on at Permalink Reply
Hi again,
I finally tried to put to work the actual 5.4.2.2 version and in my case it worked out fine.

I used the same modification of /modules/block_types.php (posted above) as in the previous version, although I used a fresh installation and not an updated one.

Hope it helps