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.

Comments

caspervoogt’s picture

StatusFileSize
new22.36 KB

Ignore this file. New one coming shortly.

caspervoogt’s picture

StatusFileSize
new22.36 KB

Ignore this file. New one coming shortly.

caspervoogt’s picture

StatusFileSize
new22.21 KB

HERE 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.

caspervoogt’s picture

If 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.

nicolabeghin’s picture

@plethoradesign: I'm really interested in this path/updated code, if there's any!

Thanks a lot
nicola

caspervoogt’s picture

I 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.

caspervoogt’s picture

I just added the patch. This is for the 7.x-2.x branch. Should work.. I just rolled it from my original code modifications.

caspervoogt’s picture

Issue summary: View changes
StatusFileSize
new11.17 KB
caspervoogt’s picture

Status: Needs work » Patch (to be ported)
caspervoogt’s picture

please test the patch. I don't have an active Joomla > Drupal conversion project to try this on at the moment (thankfully!)