I made this module, based on the Drupal issue http://drupal.org/node/367595, because I had a LOT of problems with this thing while I was working in an International site project. The solution is similar to http://drupal.org/node/367603 but with a different strategy.
CTF translation logic is almost transparent to the entire system, causing most of the contributed modules can work without be aware of translation issues. I have proved with “Views”, “Node Reference” and other popular modules and CTF works well.
For a working sample see:
http://webxaonline.com/ctf/
You can also try the module using this authentication data:
For login as admin: admin/123456
For login as editor: editor/123456
Please don't write bad words there :P
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | ctf.zip | 24.05 KB | ricardodpsx |
Comments
Comment #1
ricardodpsx commentedComment #4
sunOnly subscribing for now.
Comment #5
ddorian commentedany news on this?
Comment #6
sunOne code comment in ctf_where_is_this_field() asks whether to use check_plain() "here" or in the calling function - but neither of both uses it.
All major issues listed above need to be addressed.
Not belonging to this review, just a personal note: This approach has hard, technical limitations and therefore won't live long. I've currently no time to explain this in detail, but I wanted at least mention it. However, especially when considering our current efforts for D7 and beyond, it would make much more sense to join forces on the future-proof solution. Again, this paragraph won't hold off this application.
Comment #7
ricardodpsx commentedthank you very much for your recommendations. I'm not Drupal expert but I would like to learn all that I need to be a pro.
I created this module because I had hard Problems with translation by node architecture, so this module save me for a lot of work and duplication of data. I know is not the Ideal solution, but is working for me, anyway I will follow your recommendations, but there is a problem with one of them:
I think I can solve almost all the "Major" tasks you told me, but not one: "usage $db_prefix" becouse that is the base of the trick, I dynamically change the prefixes to simulate the translation by field, this way if the language is set to spanish, drupal retrieve from table 'es_node' instead of 'node', 'es_node' is a view that has the same structure as node but retrieve the title field for another table, the same thing happend withr cck tables and node_revisions tables.
So, that is an impassable obstacle? there is another way to change the name of some tables dynamically for all the core during queries? Is imposible to use $db_prefix variable without cause side-effects?, Currently I don't have Idea of how to do that without modify dynamically $db_prefix, I would appreciate any clue you can give me.
Another question:
There will be early a Drupal 6 patch for translatable-field, compatible with views, cck and common modules?
Comment #8
sun$db_prefix is used exclusively for Drupal multi-site setups. With the approach of this module, users cannot use custom database prefixes.
While that would just be a documentation issue, I fear that this (ab)usage of $db_prefix can lead to security issues. I'm not sure, but this needs to be ensured.
--
Translatable fields is a unique new feature in Drupal 7 core, which required substantial changes to the entire field system. D7's field system speaks languages now, or in other words: A language is required for the entire workflow of field values. Each and every field value has a language. The "node translation" approach is basically dead in D7.
However, while D7 now requires a language for every field (value), it does not ship with a built-in field translation UI, as we were running out of time. We (the Internationalization team) are implementing this over in http://drupal.org/project/translation - of course, you are welcome to join that effort.
This fundamental language support cannot be backported to D6, as you'd have to rewrite Node, CCK, Views, and any other module that tries to work with fields.
Again, personal note unrelated to this application: Since D7 is getting more and more stable, it would make zero sense to try to implement yet another field translation hack for D6. Any approach that does not change the core structure of fields to always have, understand, and support a language won't work out. D7 contains exactly that core change now. And since fields are used for plenty of things in D7 (not just nodes), the new translatable fields allow you to translate much more content.
Comment #9
avpadernoThere have not been replies in the past week; I am marking this application as .