I am using the native translation in Drupal 7 (no i18n) and needed to migrate some Joomla 1.5 JoomFish translations. Unfortunately, those don't live in the usual jos_content table and mapping the language IDs to correct Drupal language codes is also a bit tricky when it comes to Chinese. For example, it is zh-tw in Joomla, but zh-hant in Drupal, and zh-cn in Joomla, but zh-hans in Drupal. In our case, the site has both traditional and simplified Chinese so we needed to import them with the full code, not just the 2-letter code... for Chinese only.
I have written an extra function into joomla.module and joomla.batch.inc, and have adjusted both so the import succeeds and correctly assigns the language. It is also set to automatically fill the node body with the Joomla intro if the Joomla item had only an intro ... this was a requirement for our specific project so you may need to tweak this for your needs.
I have attached the complete project as a zip file. The only relevant files are joomla.batch.inc, joomla.info, and joomla.module.
Before using this make sure to have your languages installed in Drupal. The code should default to "undefined" for the language if the detected language is not supported by Drupal. If you are using other languages that have multiple codes (like Chinese) you will likely need to adjust the code to account for those. Ultimately some sort of UI for mapping languages (via arrays) would be great to have.
I'll post the zip file in a moment.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | joomla-joomfish_support-1968034-8178161.patch | 11.17 KB | caspervoogt |
| #3 | joomla.zip | 22.21 KB | caspervoogt |
| #1 | joomla.zip | 22.36 KB | caspervoogt |
| #2 | joomla.zip | 22.36 KB | caspervoogt |
Comments
Comment #1
caspervoogt commentedIgnore this file. New one coming shortly.
Comment #2
caspervoogt commentedIgnore this file. New one coming shortly.
Comment #3
caspervoogt commentedHERE is the zip file. It will probably install ... but I have not tested that. The main thing is the 3 files; joomla.batch.inc, joomla.info, and joomla.module. I don't have patch files .. maybe later, or maybe someone can run a diff and create patch files & test.
Comment #4
caspervoogt commentedIf anyone is interest in a patch, let me know. I have been using this code to import ancient Joomla 1.5 / JoomFish sites and it's helped a lot.
Comment #5
nicolabeghin commented@plethoradesign: I'm really interested in this path/updated code, if there's any!
Thanks a lot
nicola
Comment #6
caspervoogt commentedI will try to put a patch together for you. If you want to try it out quickly, you can download the zip file above and unzip it to sites/all/modules and enable the module; that ought to work. It contains the module files for 'Joomla to Drupal' but with my changes, and I'm pretty sure it works as is. But... obviously a proper patch would be better.
Comment #7
caspervoogt commentedI just added the patch. This is for the 7.x-2.x branch. Should work.. I just rolled it from my original code modifications.
Comment #8
caspervoogt commentedComment #9
caspervoogt commentedComment #10
caspervoogt commentedplease test the patch. I don't have an active Joomla > Drupal conversion project to try this on at the moment (thankfully!)