Hello,

I've tried to find an answer using google, but... i find nothing. So the problem is in translation of node title label and node body label. I define new content type in my module like in example here http://api.drupal.org/api/file/developer/examples/node_example.module/6 . (I use t() function in hook_node_info for title_label and body_label and don't use it in hook_form() for title and body fields labels). Everything works fine with translation until i edit content type data. After content type editing translation is broken.
I looked in DB and node module implementation and find out that if content type form was submitted (even if i don't edit titles, only set comment settings) then in DB table {node_types} flag "modified" is set. And if flag is set then function _node_types_build() overrides content types settings retrieved from hook_node_info() by saved in database without wrapping title and body labels values in function t().
I can solve this problem by wrapping labels in hook_form for body and title, but for which purpose labels wrapped in t() in example module if any change in content type breaks expected translation behavior? Or i'm wrong in something?

Thanks.

Comments

ainigma32’s picture

Status: Active » Postponed (maintainer needs more info)

I believe you need the i18n module(s) to do that. You could try watching this screencast http://drupal.org/node/201788

I would link to the handbook pages but they are a bit broken at the moment.

Please post back how that works out for you.

- Arie

grafsl’s picture

Thank you for the link, Arie. It turned out that my problem is already known and it's discribed in "Missing features" section. I'll be waiting for it to be solved.

ainigma32’s picture

Status: Postponed (maintainer needs more info) » Postponed

OK I guess postponed is the right status then.

- Arie

gábor hojtsy’s picture

Status: Postponed » Closed (works as designed)

The title label and body label are editable on the UI and therefore should not use the source code translation tool. The i18n module provides features to do these.