Creating a Multilanguage Site with D5.x

Events happening in the community are now at Drupal community events on www.drupal.org.
level09's picture

I'm new to Drupal, I am about to create a multi-language site, I had to go with D5.7 since D6 is not yet compatible with many modules that I want to use.
I've been researching drupal sites for a step-by-step guide , I found some information in drupal handbooks but I still have many questions:

  • the locale module allows to translate core drupal modules and strings, does the i18n module allow to translate any newly installed modules ? or is it just about translating content (nodes) ?

  • I need to switch the direction of the theme depending on the selected language, what are the language variable available for me to check ? can I use this code in my theme files :

    switch ($user->language ) {
    case 'en':
    //load LTR stylesheets
    break;
    case 'ar':
    //load RTL stylesheets
    break;
    }

any help would be greatly appreciated :)

Comments

Translation

steinmb's picture

Hi
The Drupal core module "Locale" enable you to translate the Drupal interface. Modules like i18n enable you to translate content of your website, like articles etc (nodes).

I have not testet D5 and RTL languages, only on D6 so I cant help you with there.

--
Stein Magne
http://smbjorklund.com

--
Stein Magne
http://smbjorklund.com

Multiple questions, so multiple answers

edinjapan's picture

The specific answer to your question is a bit complex, and you probably won't find anyone who is an expert in all available modules, but let me give it a shot.

First, the most "efficient" way to translate the various contributed modules is if you have a .po file in the language you need for that module. If you have this file, then when you install a module, you go to Admin > Localization and add the .po file for that module just like you would add a new core language. (See my documentation page here: http://drupal.org/node/114756) This will translate the strings accompanying that module. Note that often .po files in different languages may not be bundled with the module as they may have been done by independent translators who haven't submitted them to the original author. A search on relevant language sites can sometimes be very fruitful.

If you don't have a .po file, you can still translate these strings from within the Localization screen. Go to Admin > Localization and click Manage strings. Then do an empty search for untranslated strings.

For content (and a bit more), you have your choice of various contributed modules. The Internationalization module or Localizer module are the most widely used. I chose Localizer so that is the one I am most familiar with. In addition to content translation features, the latest version of Localizer provides a translation management screen for "added" strings such as your site name, mission, etc. If you are interested in Localizer, you might find my guide of some help. http://drupal.org/node/114750. For the Internationalization module, the documentation is at http://drupal.org/node/133977. (Note that you should NOT install both.)

I am afraid I am not a coder, so I can't help you specifically with your RTL question, though I have seen multi-lingual sites including RTL done with Localizer. (I suspect the same is true for Internationalization.)

can i just say THANK YOU!

ohsweetie's picture

can i just say THANK YOU! your feedback on this post really helped me out. xo

===================================
ohsweetie crafts + consulting

academics
crafts
to do lists
stickin' it to the man

www.ohsweetie.com

Thanks guys, that was very

level09's picture

Thanks guys, that was very helpful. I found out that i18n adds language strings (en/fr/de) to the URL, which makes it possible to load different templates depending on URL aliases : http://drupal.org/node/139766
it is also possible to query the global language variable defined in i18n api, and load different stylesheet depending on it. (i'm trying that out)
another question , since D6 comes with better multilingual support and RTL support out of the box, do you think it is easier to try to migrate D5 modules to D6 and make use of the multilingual capabilities in D6 instead of trying to work on D5 ?

Thanks again for the great advice


Simple Drupal Themes
http://level09.net

Property Management with Drupal
http://smsar.me

If you are considering using

jose reyero's picture

If you are considering using i18n with Drupal 5, I'm the module maintainer btw, there's also some rtl/ltr support in that module, see http://drupal.org/node/142214

However, if Drupal 6 is an option for you, much better support for that is provided by Drupal core itself. There's already a development version of i18n for Drupal 6, which will work seamlesly with core multilingual support, and adds other features not provided by Drupal core yet, http://drupal.org/node/223958

Great !

level09's picture

Excellent ! thats exactly what I was looking for !

Thank you for pointing that out


Simple Drupal Themes
http://level09.net

Property Management with Drupal
http://smsar.me

Internationalization

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: