I'm new to Drupal. Our current site, www.edufone.com, uses php defines for localization. For example, our aboutus.php page includes code such as:
<?= ABOUT_US_HEADING ?><?= ABOUT_US_TEXT ?>
<?= ABOUT_US_TEAM ?>
and either an English and Spanish include file is included with defines for each of these strings. For example, our English language file includes these php defines:
define('ABOUT_US_HEADING', 'About Us');
define('ABOUT_US_TEXT', 'The one device people have with them most of the time is their cell phone/mobile device. The two biggest barriers to learning are cost and time. Each week we publish a new free podcast that teaches Spanish. You can remove the time barrier by learning Spanish while you do daily tasks such as commuting or cleaning. The Edufone founders believe in the saying “Inch by inch, life’s a cinch. Yard by yard, life is hard.” Minute by minute, you can improve your mastery of any subject matter.');
define('ABOUT_US_TEAM', 'The Edufone Team');
and the Spanish language file includes the same defines with a Spanish translation.
Do any of the multilanguage modules offer an automated way to import the language translations into Drupal?
Which multilanguage module would minimize the amount of work required to port our site to Drupal (given our current structure for storing the languages using PHP defines)?
If someone else has already ported your multilingual site to Drupal, I'd certainly appreciate any words of wisdom that you'd like to share.
Thanks,
Jade
Comments
> Do any of the
> Do any of the multilanguage modules offer an automated way to import the language translations into Drupal?
Nope. I think you'd have to create a page in drupal, copy/paste the english into it, click 'translate' and copy/paste the spanish into a corresponding page.
However, be warned - you've got a great-looking site which seems to function quite well. On first glance Drupal's current language functionality/capability could not replace what you already have; it works in a completely different way and is nowhere near as transparent (or 'stable'). I'm trying to build an english/spanish drupal site for a school, and the multi-language aspect of it is driving me slightly crazy. Personally I'd be wary of using drupal for a community site where language learning is the main purpose.
Having said that, these two are built using drupal:
http://www.busuu.com
http://www.iwanttospeak.net
However, I think they've had a lot of improvements made by professional developers.
Do you mind elaborating on the parts of the multilingualism ...
Do you mind giving specifics about what parts of the multilingualism are driving you crazy? It would be helpful to know ahead of time what the challenges are. Thanks also for referring me to the other multilingual Drupal sites. Perhaps I can write an import module to take in the PHP defines and create the .po files? Since I'm just now looking into Drupal, I still have a ton to learn.
Jade
Learn Spanish
www.edufone.com
> Perhaps I can write an
> Perhaps I can write an import module to take in the PHP defines and create the .po files?
po files only contain the drupal core 'interface' vocabulary and phrases.
And note that the default 'english interface' is actually hardcoded into the drupal core php files.
Your content is separate - kept in database tables. So you're talking about a script that would have to parse your php files, create an 'english version' table in your drupal database, and insert your header, text and team includes in the right cells. It would repeat the process to create a 'spanish version' database table. and then flag it as a translation of the english version, so the two are linked.
Then you've got big problems adding the other information required for each 'node', such as content-type, menu entry, author, view/edit/delete permissions, date, published state, frontpage state, taxonomy, etc, and much of this info might not even be kept in the same table as the content itself.
> Do you mind giving specifics about what parts of the multilingualism are driving you crazy?
'Slightly crazy'. If I were to make a list, each entry would take the form of one of the following:
· If you use [insert module] and set it to [insert setting], the language [insert unexpected behaviour or bug]
· If you use the multisite feature with rewrites, the language [insert unexpected behaviour or bug]
· I expected the language to [insert desired behaviour] but for some reason it [insert weird behaviour]
However, the only way you're going to find out whether you can adapt your site to suit drupal's language implementation is try and reconstruct some of it in drupal and see if it works well enough for you.
You might even want to try building your site on D5 rather than D6 - I get the impression that the language functionality is more stable, and it has a lot more language and community-building modules. Just be aware that if you decide on D5, there might not be a plausible upgrade path to D6 later.
Thank you!
I'll try it out but it does seem very labor intensive. I've noticed other posts of sites that use both Drupal and zen-cart (which we're using) so perhaps I'll add some Drupal pages and keep the others as they are.
Jade
Learn Spanish
www.edufone.com