I have my Image nodes configured to be multilingual. When I have to import several images language information cannot be set.
I have developed a patch to show a language selector in the import page in order to set all image language to the one selected by the user.
This is my first patch and I am not sure if I have done everything well. I have generated it against dev version. If I have made any mistakes, please let my know.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | image.module.patch | 818 bytes | sharlak |
| #2 | image_import.pages.inc.patch | 1.85 KB | sharlak |
| image_import.pages_.inc_.patch | 1.75 KB | sharlak | |
| image.module.patch | 805 bytes | sharlak |
Comments
Comment #1
sunThanks!
The dependency is Translation module, not i18n module.
Please replace all instances of 'i18n' with 'translation'.
Comment #2
sharlak commentedThank you very much for the corrections. I have made the changes in the code.
I have also added a condition in order to show language selector only if image nodes are internacionalizated.
Comment #3
joachim commentedhttp://drupal.org/project/translation seems to be only for D7.
Comment #4
sunYes, that project is the i18n core team's module override (i.e., version 2.x) of the Translation module in Drupal 7 core. In other words: D6 and D7 ship with a translation.module (aka. "Content translation"), which adds simple language support for nodes.
However, now that I mention this, I just looked up Node module's schema in D6, and {node}.language seems to be defined by Node module itself already. So I think that the changes in image.module actually do not need any module_exists(). We should keep the condition in the configuration form though.