Last updated December 8, 2009.

The following steps are for those who want to have a simple site available in different languages. The goal is to have content translated to two or more languages and the visitor to be able to choose any of them. Also, the menus must follow the selection. I have tested the result with content types page and story. I don't know what happens with forum, for example. I hope this helps you.

In the parentheses I give the relative path in the url. So, if your site is http://example.com/drupal and in parentheses I give admin/build/modules, then the url becomes: http://example.com/drupal/admin/build/modules

  1. Install Internationalization module
  2. Go to the modules (admin/build/modules) and in Core - optional section enable
  • Locale
  • Content translation
  • In the Multilanguage - i18n section enable all available. If you haven't enabled Poll and Profile modules, Drupal asks you if you want them enabled. If you don't want them, in the Multilanguage - i18n don't enable Multilanguage Poll and Multilanguage Profile.
  • Save
  • You now need the translation files for all the available languages of your site (if you haven't got them already). Go to the translations page and download. Then extract them to Drupal's folder (see at 2 minutes 30 seconds into this videocast for the correct way to extract translations; you can ignore the rest of the video as it deals with installing Drupal in a language other than English, while this page deals with adding a language after Drupal has already been installed).

    You have to add this language:

    1. Go to the Languages page (admin/settings/language)
    • Add all the languages you downloaded and extracted (admin/settings/language/add)
    • Choose Configure
    • In the Language negotiation choose Path prefix only and save settings
  • Make sure English is the default language
  • Go to the blocks (admin/build/block)
  • In the Disabled area choose a Region for the Language switcher
  • Choose Save blocks
  • Ok, now you are at a good point. Choosing a language from the Language switcher, the Built-in interface changes to the corresponding language! If it doesn't make sure that it is translated. For that, navigate to admin/build/translate and check the ratio. It must be close to 100%.

    The next steps are to make multilingual content.

    1. Enable Multilingual support for all content types you want (admin/content/types)
    • Choose edit for the content type you want (e.g page)
    • In the Workflow settings choose Enabled, with translation and save
  • Now create content for the content type you have enabled multilingual support (e.g a page) (node/add/page)
  • In the Language field choose English
  • Save the page
  • Choose the Translate link
  • Choose add translation for the language you want
  • Write the page. The value in the Language field should show the selected language and be disabled/greyed out.
  • Save
  • Now you should be able to switch between translations when viewing the page by using the Language switcher block.

    You might want to use flags instead, in which case you'll need the Language Icons module.

    For your site to be fully translated you need to have the menus translated. You have two options!

    1. Build a menu for every available language
    2. Build one menu with links that point to every available language. What I mean is that if node/1 is your home page in English and node/2 in Greek, in your menu you have to make a link to node/1 named "Home Page" and one to node/2 named "Αρχική Σελίδα" (this is home page in Greek). You have to do this for every multilingual page.

    Try both options and choose what is best for you.

    1st option (multiple menus)

    1. Add a new menu (admin/build/menu/add)
    2. In the Menu name give a name, e.g. en-menu
    3. Give title, description and Save
    4. Add an item (admin/build/menu-customize/menu-en-menu/add)
    5. Give the path for the English page (node/1)
    6. Give the English name for the link
    7. In the Language combo box you don't have to choose a language!
    8. Save
    9. Add a new menu for the second language (admin/build/menu/add)
    10. In the Menu name give a name, e.g. el-menu
    11. Add an item (admin/build/menu-customize/menu-el-menu/add)
    12. Give the path (node/2), name and save
    13. Use the same procedure to build menus for all the available languages you have

    Ok, you now have your menus. Let's display them.

    1. Go to the blocks (admin/build/block)
    2. Go the the Disabled area and choose a Region for your menus
    3. Choose Save blocks
    4. For your English menu choose configure under Operations column
    5. In the Multilingual settings choose English as language and save
    6. Do the same for the rest menus and choose the appropriate language

    2nd option (one menu)

    1. Add a new menu (admin/build/menu/add)
    2. In the Menu name give a name, e.g. multi-menu
    3. Give title, description and Save
    4. Add an item (admin/build/menu-customize/menu-multi-menu/add)
    5. Give the path for the English page (node/1)
    6. Give the English name for the link
    7. In the Language combo box choose English
    8. Save
    9. Add another item (admin/build/menu-customize/menu-el-menu/add)
    10. Give the path (node/2) and name
    11. In the Language combo box choose your language, e.g. Greek
    12. Save
    13. Do the same if node/1 is translated to more languages
    14. Use the same procedure to build menus links for all the available pages you have multilingual

    Now, display your menu

    1. Go to the blocks (admin/build/block)
    2. Go the the Disabled area and choose a Region for your menu
    3. Choose Save blocks

    Done! Now, when you choose a language on the language switcher, you should see the content translated and the correct menu.

    Comments

    -Anti-’s picture

    Well done. Nice, clear tutorial. Thanks for taking the time to write it.
    If this information isn't already in the 'documents' section for v6.x, you should perhaps consider adding it.

    Cheers.

    Everything I say is opinion, even if interpreted as fact.
    Sometimes I may be inaccurate or *GASP* wrong!
    Sometimes I attack Drupal due to frustration. Get over it.

    Jijdaar’s picture

    Thanks for this tutorial, helps a lot.

    Any idea how to remove or disable the language flag/selection at the bottom of the page? Using the Language switcher should be enough.

    nyirocsaba’s picture

    Same problem here.
    Help please!

    bsimon’s picture

    The easiest way is to add this to your theme's main css file

    a.translation-link {display:none;}

    see http://drupal.org/node/242408

    nyirocsaba’s picture

    Thank you
    div.links {display:none;} it is better, while the space remind there

    kingyann’s picture

    Can't you just go to: admin/settings/i18n/translation

    and set the Links to Node Translations to NONE?

    xmacinfo’s picture

    The Drupal 6 version of the internationalization module does not offer this configuration. In fact, your URL does not exist in D6 with the internationalization module.

    inkman’s picture

    I'v tried this: a.translation-link {display:none;} but didn't work, what other method are there to help me?

    astra’s picture

    Go to: Administer > Site configuration > Language

    Select the tab: Multilingual system

    Choose the option: Hide content translation links

    It's done!

    lionalx’s picture

    When i put the multi-lang. menu in the sidebar it works great, but when i define it as "primary links" in menu>settings all items are visible all the time. I also tried method explained here (http://drupal.org/node/70194, enabling language dependent variables for the menus in setting.php), but it didn't work at all.

    I need the "primary links" definition to display it inside the themed header.

    any ideas how to solve it?

    thx!,
    alex

    auris’s picture

    What do you mean by "when i define it as "primary links" in menu>settings"?

    Primary links is a special built in menu. If you add two nodes the way is demonstrated in the 2nd option (one menu) the links switch correctly between language selections.

    If not, check
    a) that you have selected appropriate language for links,
    b) and the menu configuration from the blocks (admin/build/block/configure/menu/primary-links), has Language: All languages

    wimvds’s picture

    I had the same problem and found a solution to this problem. First make sure you have installed i18n and enabled it. Alter the settings.php file in sites/default and add the following snippet (should work in Drupal 5 & 6) :

    $conf['i18n_variables'] = array(
            // Site configuration
            'site_name',
            'site_slogan',
            'site_mission',
            'site_footer',
            'anonymous',
            // Node help
            'blog_help',
            'story_help',
            // User configuration
            'user_registration_help',
            'user_mail_welcome_subject',
            'user_mail_welcome_body',
            'user_mail_approval_subject',
            'user_mail_approval_body',
            'user_mail_pass_subject',
            'user_mail_pass_body',
            // Primary and secondary links
            'menu_primary_menu',
            'menu_primary_links_source',
            'menu_secondary_menu',
            'menu_secondary_links_source',   
        );

    Then create one menu per language as described in the tutorial above (using one single menu with all languages didn't work for me - due to menu items that don't have Drupal nodes). If you look at the menus settings screen (admin/build/menu/settings) you should see a notification below "Menu containing primary links" and "Menu containing secondary links" that states that they are a multilingual variable (if not something went wrong). Now switch to the first language you want to use (using the language switcher), select the appropriate menu(s) for primary and secondary links and save. Repeat this for every language you wish to use (ie. switch language, select menus, save). Now you should have correct multilanguage primary/secondary links (it worked for me using a single hierarchical menu for both primary/secondary links).

    And now you'll probably run into the active class bug (http://drupal.org/node/220559), which really needs to be solved (there's a patch that works in that thread, but it's not recommended to use it, since it changes core files)...

    comunactivo’s picture

    great tutorial, i was using google translation service but now i will try to apply the core translation.

    Regards

    --
    comunactivo

    infolab’s picture

    Thank you wimvds.

    doomed’s picture

    Are you sure this works on Drupal 6?

    I know it worked on Drupal 5, but its not working very well on my Drupal 6.10 .

    At least the fields i tried, most from Administer / Site Configuration / Site Information (title, footer, etc).

    osherl’s picture

    This works in Drupal 6.13. Really helped me, especially with the "Site information" variables on my Aromark Shipping site. Thanks wimvds!

    Laszlo

    priyanka.salunke’s picture

    plz gv me detailed info abt ths

    priyanka.salunke’s picture

    plz send me whatever u hv done
    it help m,e out plzzzzzzzzzzzzzzz
    send me on my id priyanka.salunke23@gmail.com

    priyanka.salunke’s picture

    now m getting language selection option then.... i hv created one page bt after selecting translation optin it is nt converting into hindi
    plz tell wht to do????????

    auris’s picture

    To have your page in all available languages you want, you have to write it yourself in all languages selecting the appropriate one each time! Then, changing language, will display the page that is write for that language.

    See

    The next steps are to make multilingual content

    in the tutorial above.

    JeniferTucker’s picture

    You probably have solved the problem by now, but for those like me looking for tutorials on how to set up a multilanguage site (trying to get categories to work without getting error messages displayed), I too thought I hadn't set up the primary links up right.

    It turned out to be that when you are logged in as 'admin', you see all the navigation (in all the languages you have added). If you logout out, or look as a normal user in a separate browser, you will see that they display correctly.

    Hope this helps.

    I have yet to solve how to add multilanguage categories to nodes. I have a set of categories all set to English. Have yet to work out how to create the alternatives in Spanish and Italian. I thought it would be a matter of clicking on the translation tab, but have managed to not make them a success. If anyone knows of a good tutorial to follow, let me know.

    Thanks

    JLT

    carrie.law’s picture

    Hi lionalx,

    I encountered the same problem as you did. What auris said was right for the primary links displayed in blocks, but not for those in themes. If you display the primary links in a block (say on the right) then it is working perfectly when you switch langauges.

    I modified the code in the theme (in the file page.tpl.php, under themes//).

    First, I added a function to the header:

    <head>
    <?php
    function print_links_lang($links_array, $locale_lang) {
       
    $links_member = reset($links_array);
       
    $links_number = count($links_array);
       
    $links_array_cnt = 0;
       
    $links_lang_cnt = 0;
        while(
    $links_array_cnt < $links_number) {
            if(
    $links_member['langcode'] == $locale_lang) {
                if (
    $links_lang_cnt == 0) {
                   
    $links_lang = array($links_member);
                   
    $links_lang_cnt++;
                } else {
                   
    array_push($links_lang, $links_member);
                }
            }
       
    $links_member = next($links_array);
       
    $links_array_cnt++;
        }
    return
    $links_lang;
    }
    ?>

    </head>

    Second, I located the following:

    <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?>

    And I replaced it with the following:

    <?php $primary_links_lang = print_links_lang($primary_links, $language->language); ?>
    <?php print theme('links', $primary_links_lang, array('class' => 'links primary-links')) ?>

    Then it should be able to get the primary links with the correct langauge.

    The same function can be used for secondary links as well.

    Locate the following:

    <?php print theme('links', $secondary_links, array('class' => 'links secondary-links')) ?>

    Replace by the following:

    <?php $secondary_links_lang = print_links_lang($secondary_links, $language->language); ?>
    <?php print theme('links', $secondary_links_lang, array('class' => 'links secondary-links')) ?>

    I have backed up the page.tpl.php file before I made the changes so I can always revert if anything goes wrong.. (I'm a newbie to php).

    Notice that if you need to switch from theme to theme, you have to do this again. I hope someone else has a better solution to this!

    Best regards,

    Carrie

    Thanks auris for the excellent tutorial! My bilingual site works perfectly now :-)

    auris’s picture

    At 2nd option (one menu), step 9 is:

    9. Add another item (admin/build/menu-customize/menu-multi-menu/add)

    paolorizzi78’s picture

    Hi auris,

    the your explination is very clear and useful, but I found a problem and tyred to see all sort of configurations but still receiving the following error:

    user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN i18n_node i18n ON node.nid = i18n.nid WHERE (i18n.language ='it' OR i1' at line 1 query: LEFT JOIN i18n_node i18n ON node.nid = i18n.nid WHERE (i18n.language ='it' OR i18n.language ='' OR i18n.language IS NULL) LIMIT 0, 5 in D:\wwwroot\drupal-5.8\includes\database.mysql.inc on line 172.

    any idea how i could fix it?

    thanx a lot,

    Paolo

    Paolo

    -Anti-’s picture

    Have you enabled the 'block' i18n module, but not the 'strings' i18n module?
    Block is dependent on strings, but it wasn't stated as such in an earlier version.
    That has now been fixed in the very latest version.
    But for earlier versions, it is fixed by enabling the 'strings' module.

    Everything I say is opinion, even if interpreted as fact.
    Sometimes I may be inaccurate or *GASP* wrong!
    Sometimes I attack Drupal due to frustration. Get over it.

    ff.tomato’s picture

    Never give up!

    Never give up!

    cloneofsnake’s picture

    Thanks for solving a mystery for me! I translated a few nodes of contents, but clicking on the languages links on the right only changes the navigation's language, node remains the same.

    eg: node/1 is in English, I made a translation and that's node/2. If I click on the "Japanese" language link on the right, it will only bring me to from en/node/1 to ja/node/1.

    Thanks for the info about "a flag at the bottom of the page for all the available translations." I don't have a flag but I have a text link "日本語" (Japanese) - clicking on that brings me from en/node/1 to ja/node/2 !!!! Yay...

    None are more hopelessly enslaved than those who falsely believe they are free. - Goethe

    doorak’s picture

    I found the same issue with Korean that you were finding with the Japanese version. Thanks for helping :)

    Tom Chambers
    The Real Estate License Professor
    Online Education Wizard

    cloneofsnake’s picture

    I just tested... wrote 1st comment from en/node/1... wrote 2nd comment from ja/node/2...

    These comments are not shared between the 2 nodes! en/node/1 only shows the 1st comment, and ja/node/2 only shows the 2nd comment.

    I think it makes more sense if a pool of translations would share all the comments amongst each other. How can I do it?

    None are more hopelessly enslaved than those who falsely believe they are free. - Goethe

    -Anti-’s picture

    I think the 'language sections' module would be your only solution for that at the moment:
    http://drupal.org/project/language_sections and co-incidentally, it would also solve the problem you first asked about - having two languages with the same url.

    So node/2 would be set to 'neutral language' and contain the content:

    === en ===
    This text will only be displayed when English language is selected by the user.
    === jp ===
    This text will only be displayed when Japanese language is selected by the user.
    === qq ===
    This part will be displayed for all language selections.

    Since the different language content is one node, the english and japanese comments will be collated.

    Note that this module this can be used in conjunction with the normal language functionality and i18n.
    But building Views to create lists of content could get confusing/difficult though.

    Everything I say is opinion, even if interpreted as fact.
    Sometimes I may be inaccurate or *GASP* wrong!
    Sometimes I attack Drupal due to frustration. Get over it.

    myDRU’s picture

    Thanks for the explananation. But I've a question/problem...

    I implemented '1st option (multiple menus)' as described above. It works fine, except when I open the home page. At that moment, no menu is shown at all in IE. It is only shown as soon as I click on the language switcher, e.g. if I choose 'English', the English menu is shown. In Mozilla, this problem is not there: the Dutch menu is shown upon opening the page.

    I'm working with Drupal 6.3 and since yesterday 6.4.
    The problem appears no matter which theme I select (as one could expect).
    The problem appears only if I configure "Administer" >> "Site Information" >> "Default Front Page" to a specific node, e.g. "node/1". If I configure "node", the mechanism works fine. What could be the root cause of this problem?

    spidersilk’s picture

    I'm working on a bilingual (English/French) site, and followed the multiple menus approach in this tutorial, and like the above poster, I've also run into an odd problem with the home page.

    What is happening is that if I go to the English home page and click on the "Français" link, I goet the French home page, and everything is fine. However, if I go to any other French page and then click on the "Acceuil" (Home) link in the French menu, I get the content of the English home page, but with French menus -- and most of the items in the menus disappear! Of the five items in the primary links menu, only the first two show, and of the six items in the custom left navigation menu, only the first one shows - all the other items in each of those menus are gone. But if I then click through to any other French page, they come back. It's only on the home page that they disappear.

    At first I thought there might be some kind of issue pertaining to URL aliases, since the French page seemed to sometimes be referenced just as example.com/fr and sometimes as example.com/fr/bizassist/basic (bizassist/basic being the URL alias of the English home page) but deleting the URL alias had no effect. The language switcher in the left sidebar references the French home page as fr/bizassist/basic and works; the menus reference it as fr and don't.

    Next thing I tried was having the Acceuil link in the French menus go explicitly to bizassist/basic instead of to - this had seemed to work with other URL aliases, for example the "Pour nous joindre" (contact us ) link in the French menu was just to contact, not fr/contact, but when the menu displayed, it added the fr/ automatically. But in the case of bizassist/basic, it didn't, and that item then went to the English page, without even the partial French menus it had before.

    Eventually I changed it to just the numeric address of the node -- node/50 -- and finally it worked! The system did add the fr/ in front of the item, and the menus displayed properly in full.

    So I've got things working now -- it just seems very odd that the system could not cope with having the French home page referenced either as or by its URL aliases, even though other aliases (contact, faq, etc.) worked fine and were given the fr/ path prefix automatically... And I'm really confused by the way it dropped some of the menu items before - those items did not have any different settings from the ones it kept, as far as I could tell.

    zirvap’s picture

    auris, would you consider posting this as a handbook page? It's an extremely useful resource. I just added a link to this forum thread from the Translation, multilanguage content, and internationalization summary page, but it would be even better if this was a child page there.

    auris’s picture

    Sorry, I had a long time to look this thread. I posted here to see if it really helps other users. If you (users) believe it must become a handbook, then I will do it as soon as possible.

    dblais’s picture

    Why we need to re-enter the menu title. It can not use the page title? Or better why when can't create the menu when we create the page...

    pressecmadur’s picture

    Thanks for the tutorial. Is there any way to get error pages (404 - not found, 403 - access denied) language dependent ? In admin/settings/error-reporting only one page can be specified for each case.

    auris’s picture

    You must have Path module enabled.

    1. Make a page, write your content and give a name in the URL path settings (e.g. pagenotfound)
    2. Make a translation of the page and give the same name in the URL path settings
    3. Go to the admin/settings/error-reporting and put the url name (pagenotfound) in the corresponding field (at the Default 404 (not found) page: in this example)
    4. Do the same procedure for the access denied page

    Please, reply if it helped you.

    alduya’s picture

    This helped for me.

    errement’s picture

    I have multi-language site (English, Spanish, Arabic & Hebrew) but having problems with Blocks.

    When you work with a site in LTR languages (ex. English & Spanish) with "Navigation-User Login-Language switcher" blocks are set to Left Region, now you click on Arabic/Hebrew from Language switcher and everything goes perfectly well translated to that language but i would like also to switch region to right for those mentioned blocks "automatically" when language is changed to RTL.

    How would i do that??

    I've been searching all around and couldn't find anything to help me!!

    I thought on something, maybe it could help, but don't know how to do it. Maybe you can tell me.

    What i thought is; while we could set a language (LTR) for the block, that block will only shows on that language page (on left region), but could i duplicate that block and set it to the other language (RTL) to let it shows on right region?!
    Is this possible or do you have another solution for me to offer?

    For all the rest of blocks i add on my site, i don't have this problem cos i can configure them to show where i want depending on the language i switch to.

    Please need help!!!

    Thank you so much.

    Athaclena’s picture

    My left sidebar just displays in the right when I switch to Hebrew - Just try playing with the CSS, direction, text-align and floats.
    This way I have the same blocks in the same region... the difference is where the region actually displays.

    I hope this helps.

    Elfendahl’s picture

    Hi,

    Thank you for a wonderful guide! However, I am unable to make the 2nd menu option work. I create a new menu, create new menu items with different languages set, but still all menu items in all languages are displayed, regardless of language specified by user. It's very strange, as if the option specified in the language box is ignored.

    Can you give me any clues as to why this is?

    Thanks!

    errement’s picture

    @Elfendahl,

    auris's 2nd option (one menu) explanation is working fine, i have just tried it and it works perfectly for me. Maybe something you're not doing right, try it again, & explain more.

    Make sure you have enabled the menu block under Blocks, and have set the menu item's Parent item to your just created menu.

    I have noticed that you get all languages as you say —menu items with different languages— ONLY if you set their Parent item as "Primary links" and are navigating "…/admin/build/menu-customize/primary-links" so maybe this is a bug, anyone noticed this bug?

    Elfendahl’s picture

    Thanks errement, I got it working now! The problem was that I did it a bit sloppy the first time and just linked the menu item to an arbitrary page. But this does not necessarily work. The page the menu item links to has to be a drupal page of the same language as the menu item, which it wasn't in my case. But now it is and now it works! :)

    t-ars’s picture

    I've been looking for this tutorial for a while. Most of them out there focus on Drupal 4 or 5.

    The next step, which makes it complete for me, is path aliasing. You can add the same alias for each translation of a node if you supply the correct language (otherwise you will get an error, telling you that the alias already exists). Instead of having links to "node/1" and "fr/node/2", this will result in "home" and "fr/home".

    Two things I'm still trying to figure out. If anyone has an idea:

    1) Always force a language prefix. I'd like all links to specify the prefix ("en/home" instead of "home" - if English is the default language).
    2) As "Jijdaar" points out, I'd also like to be able to remove the language selection at the bottom of each node (without using dirty theme hacks).

    errement’s picture

    @t-ars,

    Two things I'm still trying to figure out. If anyone has an idea:

    1) Always force a language prefix. I'd like all links to specify the prefix ("en/home" instead of "home" - if English is the default language).
    2) As "Jijdaar" points out, I'd also like to be able to remove the language selection at the bottom of each node (without using dirty theme hacks).

    As for the first:
    -Go "…/admin/settings/language/edit/en" and enter "en" for "Path prefix" and click "Save language"
    -Go "…/admin/settings/language/configure" and choose "Path prefix with language fallback." as "Language negotiation" and click "Save settings"
    -Now go "…/admin/settings/site-information" and you'll find that the home page displays content from this relative URL: "http://www.example.com/en"
    -This way, ALL what you visit under english language will begin with "/en" and other languages "/…the_language_prefix_here…"
    -Maybe you should consider visiting "…/admin/settings/i18n" to select "Content selection mode" as you wish.

    Finally for the second; i think you want to configure it as you do with the Language icons under "…/admin/settings/language/configure/icons" by adding or not, icons to "Node links" but i think this is not possible —as far as i know, maybe someone out there have tricks w/o hacking files—.

    t-ars’s picture

    Thanks a lot for the hint on the first one, I had "Path prefix only" as "Language negotiation", which doesn't prepend the language prefix for the default language. Now it works.

    I'll try to find a clean solution for the second issue.

    t-ars’s picture

    For the second issue: The cleanest solution would be an extra checkbox in the translation settings that just allows you to choose if you want the links or not (translation.module => function translation_link() could check if it needs to generate anything).

    But since we're not allowed to go in there ;-) I have a dirty hack solution:

    In template.php of your theme add the following function

    <?php
    function mytheme_links($links, $attributes = array('class' => 'links'))
    {
       
    $firstlink = reset($links);
        if (
    $firstlink && $firstlink['attributes'] && $firstlink['attributes']['class'] == 'translation-link')
        {
            return
    '';
        }
        else
        {
            return
    theme_links($links, $attributes);
        }
    }
    ?>

    It detects if translation links are themed and returns the empty string, otherwise the default theme function is called. Not quite what I'm looking for, but it does the trick for the time being.

    yudi_set’s picture

    Hi,

    I'm a newbie.
    Thanks for sharing.

    I have a fresh install of Drupal site (in English).
    And then I added 2 more languages.
    I'm also need to do the same as you.

    So, I copied the mytheme_links function to the template.php file in /themes/garland/ folder (I'm using the standard Garland theme).
    But it does not work.
    The language selection still appears on the bottom.

    Maybe there's some setting that I need to configure?

    Please help.
    Thank you.

    t-ars’s picture

    "mytheme" should be replaced by the name of your theme.

    So, in case of Garland, the function-name should read: garland_links

    Hope this helps.

    yudi_set’s picture

    It works!

    After I cleaned the cache, the language selection does not appear anymore on the bottom of the node.
    Really appreciate your help.

    Thanks a lot!

    markgardner’s picture

    This is exactly what I was looking to do http://drupal.org/node/299647 thanks to yudi_set pointing me here.

    Unfortunately I can't get it to work. Despite copying the function to template.php in my themes folder and renaming the the function accordingly, even after deleting temporary files it still displays links under the nodes.

    Any more ideas?

    Mark

    libernux’s picture

    Just add the following to the end of the css-file:

    ul.links li, ul.inline li {display: none}

    Tested and working on theme Garland

    pearlliang’s picture

    Hi Easy and All,

    "Path prefix with language fallback." is not working for my website, it only works when I click mywebsite/user. I don't know what was wrong. I search many articles but found no clues. This is what I did:

    1. I installed and enabled drupal 6.22, internationalization, locale, translateion tables, chinese translation.

    2. Originally, I choose 'Path prefix only" and follow auris's steps mentioned above, and it works. Later, I changed to "Path prefix with language fallback" because I need to make my website show users' preferred language. I assigned "en" prefix for the default (English). I enabled menu in many ways (1 menu with multi-language, 1 menu with "All language", different menu with different languages, and 1 men).

    3. I went to my account page (mywebsite/user) and change my language to be Chinese (the other language I installed). I log out and log in. But, after I log in, the whole website still shows the default (English) menu, interface and content. I supposed "path prefix with language fallback" will show the preferred language defined in My Account page.

    4. I installed Chinese version of Firefox and Chrome browser and use those browsers to visit my webpage. Still, only the English version was shown.

    5. In the Site Configuration -> Language -> Multilingual setting, I tried "Current language and language neutral" and "Mixed current language (if available) or default language (if not) and language neutral", but none of them worked.

    5. The only 2 things work are when I click mywebsite/user and click Language Swtich Block.

    Please help. I need to make users see their preferred language after log in, otherwise I will be in trouble. Thanks a lot.

    auris’s picture

    To remove the language switcher for each node, try the following hint: http://groups.drupal.org/node/16148

    mansspams’s picture

    How do I assign user a premission to edit only one language in D6 multi-language site?

    lennyaspen’s picture

    i should say man
    really nice tutorial
    thx

    Fit your imagination...

    skessler’s picture

    Is there a way to have one node that has 2 bodies (one for English one for French). I am familiar with CCK so I see how I could maybe do it that way but I think there has got to be a better way.

    Thanks,
    Steve

    Steve Kessler skessler[at]denverdataman.com
    Denver DataMan - http://www.denverdataman.com

    Steve Kessler steve@denverdataman.com
    Denver DataMan - http://www.denverdataman.com

    mansspams’s picture

    Add one more textfield for French. How much better can it be? Do you have any special needs for functionality?

    skessler’s picture

    Then I guess I would put the code on node.tpl.php for sorting out what language the site is in for which CCK field to show. My concern is that is a lot of logic to put in the theme.

    Thanks,
    Steve

    Steve Kessler skessler[at]denverdataman.com
    Denver DataMan - http://www.denverdataman.com

    Steve Kessler steve@denverdataman.com
    Denver DataMan - http://www.denverdataman.com

    -Anti-’s picture

    > Is there a way to have one node that has 2 bodies (one for English one for French)

    Check out the 'language sections' module:
    http://drupal.org/project/language_sections

    You have one body, but the filter displays only part of it,
    dependent on the current language selection.

    Everything I say is opinion, even if interpreted as fact.
    Sometimes I may be inaccurate or *GASP* wrong!
    Sometimes I attack Drupal due to frustration. Get over it.

    astra’s picture

    Maybe the modules Language Section can help you. See project:

    http://drupal.org/project/language_sections

    rfranquet’s picture

    To internationalize the menu, there are a 3rd option.
    It changes the content automatically when you switch the language .

    - Active the path module to have URL Aliases

    1. Add a new menu (admin/buid/menu/menu/add)
    2. Give the menu name and Save.
    3.Add an item (admin/build/menu/item/add)
    4. In the Language combo box you don't have to choose a language!
    5. Give the title title in English
    6. Give the path for the English page (node/1) and Save.
    7. Translate the menu title with Localization (admin/settings/locale/string/search)

    =====================================================
    *** Two languages ***
    1=English 2=Spanish

    (alias English => Spanish)
    8. Add URL Aliases (admin/build/path/add)
    9. Give Existing system path node/1 give Alias node/2 and Save

    (alias Spanish => English)
    10. Add URL Aliases (admin/build/path/add)
    11. Give Existing system path es/node/2 give Alias es/node/1 and Save

    =====================================================
    *** Three languages ***
    1=English 2=Spanish 3=German

    (alias English => Spanish)
    8. Add URL Aliases (admin/build/path/add)
    9. Give Existing system path node/1 give Alias node/2 and Save

    (alias English => German)
    10. Add URL Aliases (admin/build/path/add)
    11. Give Existing system path node/1 give Alias node/3 and Save

    (alias Spanish=> English)
    12. Add URL Aliases (admin/build/path/add)
    13. Give Existing system path es/node/2 give Alias es/node/1 and Save

    (alias Spanish=> German)
    14. Add URL Aliases (admin/build/path/add)
    15. Give Existing system path es/node/2 give Alias es/node/3 and Save

    (alias German=> English)
    16. Add URL Aliases (admin/build/path/add)
    17. Give Existing system path de/node/3 give Alias de/node/1 and Save

    (alias German=> Spanish)
    18. Add URL Aliases (admin/build/path/add)
    19. Give Existing system path de/node/3 give Alias de/node/2 and Save

    zweipunktnull’s picture

    Now, for every page you have created there should be a flag at the bottom of the page for all the available translations. Choosing that flag should display the appropriate page. The same happens if you choose language from the Language switcher.

    However, I don't want to have these flags at the end of each page/article, because I have already the language switcher in place. How/where can I switch off these flags?

    br

    Peter

    br

    Peter Ungvari
    CEO zweipunktnull GmbH.

    Benxie’s picture

    All work well, exempt for one thing, the primary links or said Menu, if I activiate them in Thems, they can't change for each language( Though i specify each menu entry with a specific language), just show up all. If I activiate them in block( Put to header), they just show up vertically.
    Till now, I just haven't an idea how to resove this problem, only can let them there in show up all lanugage links in the header.

    GRboss’s picture

    This tutorial gets an A+

    Be thankful for problems. If they were less difficult, someone with less ability might have your job.
    James A. Lovell

    virtualgirl’s picture

    if your in ubercart you need drupal 5 and i am unable to properly configure languages... Any sugestions?

    virtualgirl

    gaele’s picture

    One of the things that can go wrong:

    Go to
    .../admin/settings/language/
    edit each enabled language and make sure it has a path prefix. Drupal won't complain if this field is empty, but switching languages won't work correctly.

    (It took me a couple of hours before I found out my non-default language had an empty path prefix ;-}

    strellman’s picture

    When you edit the language at admin/settings/language/edit/en
    and you are negotiating langauge based on domain name, don't forget the http:// prefix.
    I know it is written there in the field help, but I missed it and things behaved very strange.

    http://2tell.org

    -Anti-’s picture

    Does the length of the comments on this thread perhaps indicated that the multi-language implementation in drupal is really very inadequate? It's become so complex and convoluted; it really is a mess. Not that this is the fault of the developers who implemented it - I'm sure they did the best job they could.

    But this is what you get when you try to simply tack, as an after-thought, multi-language support onto a system which wasn't designed for multiple languages in the first instance. IMO if Drupal is ever going to be able to claim that it is truly multilingual, at some point the current implementation is going to have to be completely scrapped and rewritten much deeper into the core.

    Everything I say is opinion, even if interpreted as fact.
    Sometimes I may be inaccurate or *GASP* wrong!
    Sometimes I attack Drupal due to frustration. Get over it.

    cloneofsnake’s picture

    I have no idea how the Drupal's inner workings are handling multi-language at the moment, but I agree that i18n's multiple language nodes is not the right way to do things. If a node content is basically just being localized, then they all should share the same comments.

    I see that you are always pushing the Language Sections module, but do you think that is the "correct" way? I was wary of using that module b'coz I don't know how well it will upgrade... (I'm a database guy and whether you mix multiple "fields" into one field, that's a problem.)

    I guess creating new CCK fields will be a better way? So like if i18n instead of creating a new node when you click translate, it makes copies of all the CCK fields under a different language, that will be a way between the current multi nodes i18n module, and the text field parsing Language Sections module.

    What are your suggestions?

    None are more hopelessly enslaved than those who falsely believe they are free. - Goethe

    -Anti-’s picture

    > I see that you are always pushing the Language Sections module
    > If a node content is basically just being localized, then they all should share the same comments.

    Um, nope. I don't even currently use it. But if you want two languages available at one url, or for multi-lingual comments to be displayed under one node, then it's the only solution available, which is why I have mentioned it in a couple of threads. But I don't think that should quite be how the main multi-language support should be implemented...

    The LSections module keeps the translation in the same database CELL as the original, which is just as bad as creating a whole new node for it. So I think the core functionality should keep the translation in the same database ROW as the node, so that there is only one NID shared between the main language and the translations, and that the comments are shared, but then there'd be some freedom within queries to treat the translation cell as its own separate entity (except of course, its NID and comments).

    > i18n's multiple language nodes is not the right way to do things

    I agree, but it's not i18n which is doing it though; it is the core language functionality which works that way. And the reason it probably works that way is that drupal wasn't originally built with multi-language in mind and this confined the language developers. Which is what I was 'complaining' about. Multi-language has obviously been implemented as a half-arsed afterthought rather than a serious consideration from the start. And until language functionality has been rewritten from the bottom up (which will break all existing sites), the implementation will just keep getting more and more convoluted and unstable.

    Everything I say is opinion, even if interpreted as fact.
    Sometimes I may be inaccurate or *GASP* wrong!
    Sometimes I attack Drupal due to frustration. Get over it.

    StefanScottAlexx’s picture

    In order to install additional languages in Drupal 6.6, I'm following the steps mentioned here:

    http://drupal.org/node/203318

    where Gábor Hojtsy stated:

    1. Download langauge package
    2. Extract to Drupal's root directory, where Drupal is already exctracted
    3. Enjoy that all files fall into place, such as modules/system/translations/*.po

    By the way, this also agrees with the info here: http://11heavens.com/building-powerful-and-robust-websites-with-drupal-6...

    But I've tried this using Drupal 6.6, and I'm getting an error message.

    Here's what I did:

    1. First I made sure there are NO languages (other than English) currently installed, because the site:

    http://11heavens.com/building-powerful-and-robust-websites-with-drupal-6...

    says:

    Get the translation tar ball (*.tar.gz file) from http://drupal.org/project/Translations, then move this file to your web root (in the same folder as index.php), then extract the file. Every extracted .po file (as there are many, many) ends up where it's supposed to be. The translation package has a tree structure, that of your Drupal installation. Then and only then, you add the language (going to admin/settings/language/add). At that point, the importing of all .po files is done automatically for you by Drupal.

    2a. I downloaded the language package (eg, Brazilian Portuguese):

    http://ftp.drupal.org/files/projects/pt-br-6.x-1.0-rc5.tar.gz

    from here:

    http://drupal.org/project/translations

    2b. Then I uploaded this to my public_html directory (which in my case is the same thing as my Drupal installation directory - because I'm using a free, shared web hosting provider which doesn't give me access to the file .htaccess which would be needed to redirect http://mydomain.com/mydrual to http://mydomain.com).

    2c. Then I used cPanel File Manager to extract the compressed tarball (eg, pt-br-6.x-1.0-rc5.tar.gz) to the Drupal installation directory. (By the way, earlier I was doing this wrong - I was extracting into a subdirectory within the Drupal directory, eg ../public_html/pt-br/ or ../public_html/pt-br-6.x-1.0-rc5.tar - because I didn't realize that extracting the tarball would actually extract each file into its proper subdirectory, due to the fact that the tarball directory structure is the same as the Drupal directory structure).

    2d. I then repeated the above steps for another language (eg, Spanish), so as to be able to test if the error message (shown below in the 'code' box) is reproducible for these two language packages (and it is - meaning that this is probably not a problem with the language packages themselves.

    I believe that the .po files have been extracted to the proper locations. For example, if I use cPanel File Manager to go to this directory...

    /public_html/modules/block/translations

    ...it contains the following two files...

    modules-block.es.po
    modules-block.pt-br.po

    ... for Portuguese (Brazilian) and Spanish, before I perform my step 3 below.

    3. Then I went to:

    http://mydomain.com/admin/settings/language/add

    and added the language (eg, Portuguese (Brazilian)).

    and I got the following error message:

    An error occurred. /?id=&op=do <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> <title>mydomain | mydomain</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" /> <link type="text/css" rel="stylesheet" media="all" href="/modules/node/node.css?V" /> <link type="text/css" rel="stylesheet" media="all" href="/modules/system/defaults.css?V" /> <link type="text/css" rel="stylesheet" media="all" href="/modules/system/system.css?V" /> <link type="text/css" rel="stylesheet" media="all" href="/modules/system/system-menus.css?V" /> <link type="text/css" rel="stylesheet" media="all" href="/modules/user/user.css?V" /> <link type="text/css" rel="stylesheet" media="all" href="/themes/garland/style.css?V" /> <link type="text/css" rel="stylesheet" media="print" href="/themes/garland/print.css?V" /> <!--[if lt IE 7]> <link type="text/css" rel="stylesheet" media="all" href="/themes/garland/fix-ie.css" /> <![endif]--> </head> <body class="sidebar-left"> <!-- Layout --> <div id="header-region" class="clear-block"></div> <div id="wrapper"> <div id="container" class="clear-block"> <div id="header"> <div id="logo-floater"> <h1><a href="/" title="mydomain"><img src="/themes/garland/logo.png" alt="mydomain" id="logo" /><span>mydomain</span></a></h1> </div> </div> <!-- /header --> <div id="sidebar-left" class="sidebar"> <div id="block-user-1" class="clear-block block block-user"> <h2>admin</h2> <div class="content"><ul class="menu"><li class="leaf first"><a href="/user/1">My account</a></li> <li class="collapsed"><a href="/node/add">Create content</a></li> <li class="collapsed"><a href="/admin">Administer</a></li> <li class="leaf last"><a href="/logout">Log out</a></li> </ul></div> </div> </div> <div id="center"><div id="squeeze"><div class="right-corner"><div class="left-corner"> <div class="messages status"> The language <em>Portuguese, Brazil</em> has been created and can now be used. More information is available on the <a href="/admin/help/locale">help screen</a>.</div> <div class="clear-block"> <div id="first-time"><h1 class="title">Welcome to your new Drupal website!</h1><p>Please follow these steps to set up and start using your website:</p><ol><li><strong>Configure your website</strong> Once logged in, visit the <a href="/admin">administration section</a>, where you can <a href="/admin/settings">customize and configure</a> all aspects of your website.</li><li><strong>Enable additional functionality</strong> Next, visit the <a href="/admin/build/modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="http://drupal.org/project/modules">Drupal modules download section</a>.</li><li><strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href="/admin/build/themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="http://drupal.org/project/themes">Drupal themes download section</a>.</li><li><strong>Start posting content</strong> Finally, you can <a href="/node/add">create content</a> for your website. This message will disappear once you have promoted a post to the front page.</li></ol><p>For more information, please refer to the <a href="/admin/help">help section</a>, or the <a href="http://drupal.org/handbooks">online Drupal handbooks</a>. You may also post at the <a href="http://drupal.org/forum">Drupal forum</a>, or view the wide range of <a href="http://drupal.org/support">other support options</a> available.</p></div> </div> <div id="footer">hosted by <a href="http://vlexo.com" target="_blank">vlexo.com</a><div id="block-system-0" class="clear-block block block-system"> <div class="content"><a href="http://drupal.org"><img src="/misc/powered-blue-80x15.png" alt="Powered by Drupal, an open source content management system" title="Powered by Drupal, an open source content management system" width="80" height="15" /></a></div> </div> </div> </div></div></div></div> <!-- /.left-corner, /.right-corner, /#squeeze, /#center --> </div> <!-- /container --> </div> <!-- /layout --> </body> </html>

    This same error also occurred when trying to add Spanish and German. I've also tested this on two different shared web hosting providers, and it occurs at both of them (using Drupal 6.6).

    When I go to http://mydomain.com/admin/build/translate, all the percentages are still zero:

    Language Built-in interface Blocks Content type Menu Profile Taxonomy
    English (built-in) n/a n/a n/a n/a n/a n/a
    German 0/1003 (0%) 0/0 (0%) 0/5 (0%) 0/0 (0%) 0/0 (0%) 0/0 (0%)
    Portuguese, Brazil 0/1003 (0%) 0/0 (0%) 0/5 (0%) 0/0 (0%) 0/0 (0%) 0/0 (0%)
    Spanish 0/1003 (0%) 0/0 (0%) 0/5 (0%) 0/0 (0%) 0/0 (0%) 0/0 (0%)

    By the way, as an alternative I also tried going here:

    http://mydomain.com/admin/settings/language/configure

    before doing my step 3, and selecting either 'Path prefix only' or 'Path prefix with language fallback' (instead of the default selection 'None') to see if selecting either of these helped avoid the error message generated in my step 3 - but I still got the error message.

    After the error message is displayed, the language does appear in the list of installed languages here:

    http://mydomain.com/admin/settings/language

    And if I go here:

    http://mydomain.com/admin/build/block

    and add a 'Language Switcher' block to my page layout, it does show up with the right language.

    And clicking on a non-default language in the Language Switcher on my home page does create the correct URL, eg:

    http://mydomain.com/pt-br
    http://mydomain.com/es
    http://mydomain.com/de

    However, all admin pages are still displayed in English, and when I go to http://mydomain.com/admin/build/translate (see second 'code' block above), all the percentages are still zero

    Any suggestions would be most welcome!

    fabius’s picture

    When I read this tutorial I had already created a second language (in ignorance) before loading a language file. So after I uploaded the language files and tried to Add the language again, it was missing from the list on the Languages page. Furthermore there is no explicit method for updating a language. This is what I did to get my language files recognised:

    - Make sure the second language is not set as default. A delete option will appear.
    - Delete the language. Drupal will give you dire warnings about what will happen but the language files will still be there.
    - Add the language again. Drupal will look for the files, including those meant for modules, etc.
    - Edit any content node you may have created in the second language and you will find its language has been set as "Neutral". Change this appropriately.

    Language files may change often so Drupal needs a way of updating these.

    fabius

    fabius

    Regw’s picture

    We're a bunch of 6.x users with this issue... see comments on http://drupal.org/node/335039

    bsimon’s picture

    This is a very helpful page, but there's now important information in the comments which isn't easy to find. It should be added to the article (I would do this myself, but normal Drupal.org users can't edit the page).

    I suggest adding these items to the menu creation section:

    1 a link to this post: http://drupal.org/node/275705#comment-1038558 and a short summary of it - maybe that summary also needs a link to http://drupal.org/node/313293 to provide more detail on string translation

    2 a link to this page: http://drupal.org/node/313302

    ...and 'different' is spelled wrong at the beginning... :)

    Sonjaaa’s picture

    How do I set it up so certain users can translate comment to language X and certain other users have the right to translate content to language Y, etc.?

    KaAsk’s picture

    I create a little site with about ten articles which regularly change. They need to be translated in some languages.

    So I'm looking for a module which permits translators (and visitors) to see what sentences or paragraphs have changed in source articles.

    Diff module is helpful, but isn't integrated with I18n modules. And it may be useful to view how old is the translated node compared with the source node.

    icanlocalize’s picture

    This is one of the features of ICanLocalize Translator:
    http://drupal.org/project/icanlocalize

    It doesn't do source level DIFF. Instead, it extracts the text from the HTML and does proper text level DIFF.

    The translator will see the entire document but will only edit the texts that are modified (or added).

    binhcan’s picture

    This is a great guide mate. Thanks very much. Without it I was just lost and couldn't make my site truly multilingual.

    Just a note though: We need the it8n module because it has more feature then the core "Content Translation".

    Also a note: To use the domain we need to use the whole domain name with the prefix "http://" otherwise it won't work. For example, my main site is jewell.vn the domain for language would be "http://en.jewell.vn" for English and "http://vi.jewell.vn" for Vietnamese.

    I want to give this note because I spend hours trying to put "en" in the text box and it didn't work. I hope you guys won't make the same mistake and waste your times.

    Remember to install the it8n module otherwise you also waste time like I did too... tried to translate the menu and taxonomy.

    Cheers,
    Binh

    Droncalonca’s picture

    See: http://www.translateapp.eu/

    it's a web app for managing internazionalization of a site, application, portal, ecc, ecc

    if you have a suggest, please contact me from the contact form of translateApp

    Bye!

    parka’s picture

    Thanks for the tutorial, it's helpful.

    I'm not sure of how to translate all the the stories on my site. Do I have to first translate the stories manually using edit before the menus can show the translated stories?

    E.g.
    I've a menu link to German translation. When I click the menu link, only the English stories with German translation are translated. English without German translation are still in English.

    How can I achieve something like Google Translate? My old way of translating my website is to point users to Google Translate, Google will then translate the requested page while it's loading the page.

    -Anti-’s picture

    Automatic machine translations are barely readable.
    However, if that's what you want then there is probably a module to integrate
    one of the translation services into your site.

    This thread is about manual translation of content by human admins/authors.

    Everything I say is opinion, even if interpreted as fact.
    Sometimes I may be inaccurate or *GASP* wrong!
    Sometimes I attack Drupal due to frustration. Get over it.

    JeniferTucker’s picture

    I'd like to try option 2, but having followed steps 1-3, am stuck on finding where this is:

    admin/build/menu-customize/menu-multi-menu/add

    Is there a module I'm missing?

    Have tried option 1, but it's getting a bit messy having lots of separate menus, so this option seems sensible.

    JLT

    auris’s picture

    No, there isn't any missing module.

    The path (admin/build/menu-customize/menu-multi-menu/add) is not a url on it's own. You should append it on the url of your site. E.g. http://example.com/admin/build/menu-customize/menu-multi-menu/add

    Or you can just go to Administer > Site building > Menus choose your menu and click the tab Add item.

    nooby’s picture

    With Your tutorial I could start... but can't see the consistent ending.

    Issues I've met:
    1. Primary links localization problem - no clean way - try to add translated 'Home' link to \node or or taxonomy-generated node.

    2. (case: mixed language, single menus, other than NAV) : In case You need to add either external or non-drupal link - the link appears twice.

    Edit:
    3. SOLVED Possibly not related - is there a way to make RSS feeds in a secondary language (100% translated, but how to use ?) or should I use Taxonomy and terms?
    Answer:

    Use taxonomy term in one language, but translate it. Add term in primary language to content page and it will be translaed in to what you set as translation for this term.

    Anyone had these issues?

    nooby

    gmateos’s picture

    thank you for the tutorial and the module...is great and a must for me.
    I installed the module and got an error: " Argument #2 is not an array.....theme.inc...line 930"...well...i investigated a little bit and discovered the problem: theme.inc is searching for a variable like "theme_xxxxx_settings" and for some of my themes installed and enabled, this variable was not setup.
    Why? because I never pressed the button "save" on theme configuration page. That's all.
    So, i went to each theme enabled, saved the configuration without changing nothing...and everything is ok now.

    EducaMan’s picture

    Thank you very much for this useful howto ;)
    Just a question : Is it necessary to make English as the default language for having multilingual support to work properly ?
    Thanks for taking time to reply ;)

    We ... Men ... it is amazing what we can write as nonsense !

    hstrindb’s picture

    Thank you for great work!

    I want Swedish to be the default language. And in the tutorial I read:

    "2. Make sure English is the default language"

    - why is that important? There seem to a problem:
    If I define Swedish as the default language the language switcher doesn't work properly. What to do?

    Best regards
    Henrik

    auris’s picture

    That was the way I first managed to enable both languages and work with.

    The 1st step can be changed in order to have any of your languages as default.
    The guide says:

    1. Go to the Languages page (admin/settings/language)
      • Add all the languages you downloaded and extracted (admin/settings/language/add)
      • Choose Configure
      • In the Language negotiation choose Path prefix only and save settings
    2. Make sure English is the default language
    3. Go to the blocks (admin/build/block)
    4. In the Disabled area choose a Region for the Language switcher
    5. Choose Save blocks

    Change the steps to this:

    1. Go to the Languages page (admin/settings/language)
      • Add all the languages you downloaded and extracted (admin/settings/language/add)
      • Choose Configure
      • In the Language negotiation choose Path prefix with language fallback and save settings
    2. For every available languages choose edit under the Operations column. In the Path prefix: field insert language prefix, e.g. en for English, fr for France etc.
    3. Go to the blocks (admin/build/block)
    4. Choose your preferred language as default
    5. In the Disabled area choose a Region for the Language switcher
    6. Choose Save blocks

    The deference is that when a visitor cames to your site, he will see the content with the default language. After that, choosing a page, e.g. node/1 he will get the prefix always for the selected language. So, if selected language is English, the path will be en/node/1 and for France fr/node/1.
    Following the previous steps (English default and path prefix only settings), there is no prefix in the url for the default language.

    Also, you can change the settings so you have no prefix for your default language, and have one for any other. To do that set Path prefix for every available language and set default your own.

    Choose what is best for you!

    apprayo’s picture

    Hi all,

    I have tried both options presented there. With any option of those two, all went well until I open the contact form in 2nd language (I made a bilingual website, English - French, with English is the default language). Opening the contact form in French makes all menus not shown. This happened with both of options. Opening contact form in English doesn't bring the same problem.

    Does anybody have any ideas what went wrong on this?

    Btw, I use Drupal 6.11 with Internationalization module 6.x-1.0.
    Thanks in advance.

    Regards,
    Albert

    Alex.G’s picture

    Thanks for great article, but still can't figure out how can i add slogan translations?
    Using only two languages at the moment.

    Thank you

    ncarson’s picture

    I know have the Language Switcher English/french button on the right side. I also have the English or French button on the bottom of my main page. The issue is this. If I am in the Englsih main page and click on french at the botto of the screen ... the page will translate to french. If I then select english at the bottom of the page it will change to the english page. Which is great.

    but the issue is this.

    When I first go to my test site it defaults to english, which is ok for now BUT if I use the Language Switcher button on the RIGHT hand side of the screen and click french the main page does not change to french. But if I use the small french button on the bottom of the main page it changes to french.

    It should be noted in the IE address bar when I select french in the side language switcher bar the url changes to
    www.mysite.com/drupal6/fr but the mainpage is still english but if I click the french button at the bottom of the mainpage the url changes to www.mysite.com/drupal6/fr/node/5 and the main page is now french

    How can I get the Langauge switcher on the right on side of the screen working ?

    I look under administer / site configuation and my default frontpage is www.mysite.com/drupal6/en/node/1 which is english. While in adminster / site configuartion if I click the side language switcer to french the default fronatpage changes to www.mysite.com/drupal6/fr/node/1 Could the problem be that my french page is /node/5 and not /node/1 ?
    If so how do I fix this ?

    Thank you very much
    Neil

    ncarson’s picture

    Ok I got it working. The below site/url help me figure it out.

    http://drupal-translation.com/node/37

    Thank you
    Neil

    donquixote’s picture

    I am using the 2nd option (one menu) with i18n module, and I have the following problem:

    Right now my site consists of a bunch of pages, some of which have translations in one or more languages. Default language is german.

    URL aliases are multi-language as well, so I have "en/about-us" for the english "About us", and "de/ueber-uns" for the german one.

    I have one menu item per node translation, all in the same menu. If I browse the site in french, only those menu items will show up that link to nodes in french. If I browse in english, only the menu items to english nodes.

    The problem is, that not all of the page nodes are translated in all languages. So, if a page is not translated in french, this item will be missing in the menu.

    Instead, I would like the german menu item to show up, if there is no french translation of the page.

    Any ideas?

    -----

    EDIT:
    See this issue: Force a menu item to show up if the node has a different language

    collectivo.org’s picture

    Hi. First, thanks a lot for this tutorial.

    My multilanguage site has forums. I'm aiming towards having different forums for each language, so posts don't mix up.

    I created all my forums, using the taxonomy translation mode "Per language terms. Different terms will be allowed for each language and they can be translated.". Any other option will not seem to work, as they enable only one language to work.

    I can see the container and forums correctly, in any language. I can post a new topic in English, in an English forum. However, when I try to post one in French, I don't get the Forum category selection above the Body, as I do in an English post. Result : my post doesn't go anywhere. A quick tour in the Content management section tells me that the Forum topic I created was not allocated a French Language, but a Language Independant language.

    My site is www.collectivo.org. I am willing to give a user access for you to test, if you want.

    Have you ever done forums in a multi-language site ? How ?
    Help desperately wanted.
    Thanks a lot !

    Collectivo.org

    Collectivo.org - Give to choose...

    cookiesunshinex’s picture

    I have this working with the default locale and content translate modules that come core in Drupal 6.13.

    I am able to create content and translate it, I am able to see the prefixes in English, Simplified Chinese, and Traditional Chinese and I'm able to select the languages from the language box.

    I see the language links at the bottom of the node content to switch between languages for that node.

    However, on the home page, I see what appears to be 3 different posts. one for each translation of the node.
    I only want the english one to show up by default and the simplified chinese one to show up when I choose that language from the language box, etc.

    What am I doing wrong, or do I need to install something other than the core locale and content translate modules??

    auris’s picture

    Do you have followed the steps to make multilingual content as they are in the tutorial? One node with 2 more translations?

    Does this happen only to the home page?

    bsenftner’s picture

    I'm getting stuck on this step early in the tutorial:

    You now need the translation files for all the available languages of your site (if you haven't got them already). Go to the translations page and download.

    The site I'm building is English and Montenegrin (language of the nation of Montenegro.)

    Do I need to create a po file set for Montenegrin to make the site multilingual?

    I already have the menus and content in Montenegrin, meaning I have translations in separate files outside of the site. I'd like to integrate them into the site in the "correct drupal manner" to prepare for the possible addition of more languages (that may be supported with po files.)

    The owner of the site and future administrators all understand English, so I don't really care about the administration interface being translated; if that makes any difference.

    Whackler’s picture

    hi,

    creating 2 different menu items with different languages pointing to 2 different views in the primary links still doesnt work (for me). Both menu items are displayed. Used the snippet but nothing...

    Any ideas how to solve?

    RichieRich’s picture

    One thing I really don't like is that if you select a language and no translation is available then the module simply presents the same version of the page but with a different URL. Surely the user should be redirected to a selected page (perhaps the home page) or another page which indicates that no translation is available. Currently it's not good in terms of usability and could lead to google penalisation due to multiple URLs containing exactly the same content.

    Also, what purpose does the menu item language selection perform? I've messed about with it and it seems to serve no purpose whatsoever. Visiblity seems to be dictated by the language of the node which the menu item is pointing to. For example, if I point the menu item to a node which is Japanese and then set the menu item's language as English it only appears when Japanese is selected.

    If I'm missing someting please point it out.

    Thanks,

    Rich

    digitalwisdom’s picture

    In this tutorial it states:
    Ok, now you are at a good point. Choosing a language from the Language switcher, the Built-in interface changes to the corresponding language! If it doesn't make sure that it is translated. For that, navigate to admin/build/translate and check the ratio. It must be close to 100%.

    I have followed all the steps correctly but when i add the language (italian), on the Translate Interface page, the ratio is only 60% of built in interface and 0% for all the others.
    I have tried with other languages that do a similar thing...

    Is it just that the language translations arent complete, or compatible with 6.x?
    Or am i doing something wrong?

    Im new to all this! Any ideas???

    monti’s picture

    hope I haven't missed it through this long discussion - I am looking for a solution to initialize the language.

    admin/settings/language/configure set to "Path prefix with language fallback"

    after the language is set, everything works perfectly.

    before language gets set, if I go to "www.example.com", rather than a specific language prefix, it is always English, although it is not the default language. I tried to set a default language value through "settings.php". Did not work. any idea? cheers!

    rusdvl’s picture

    I cant seem to create new content while im in the secondary language. So if I switch to the secondary language and try and create a new 'page'. It fails, no errors come up, it just doesnt create it. Any ideas why?

    EDIT: ignore... all is working.

    mattbuzz’s picture

    I just have what maybe a stupid question but thanks in advance for helping with it.

    I have followed the instructions etc and the only thing that does not seem to work for me is the body content of the node is not being translated.

    Is this configuration supposed to translate the body or is it really creating the framework as in menu titles, path changes etc ?

    Or am I missing something.

    I have edited my content type settings etc, on the content when i do the translate option etc it adds the translation as in the /de/node when you switch to that translation the menu options etc are in German as they should be but the body and Title are in English.

    Thanks in advance for some point in the right direction..

    ecologuy’s picture

    Hey,

    I've had no problems getting pages translated, getting the language switcher to work, and getting translated menus. However, I also wish to use the profile translation module. There is nothing on google about this, which surprises me. I have it enabled. I've checked permissions, see nothing special. But I don't know what it does basically. If I go to site building / profiles, I see no new options. I thought I could translate fields somewhere. What is the purpose of this module and how do you get it to work?

    Thanks.

    tuckery’s picture

    thanks for good tutorial

    adrianmak’s picture

    I used first option for creating menus.

    I found that when translating a content, menu of current language will be disappear.

    aamin’s picture

    Very nice tutorial. Thanks

    hau.nhp’s picture

    It really works. Well done. I'm a newbie, so the post you made is very helpful. Thanks again.

    Nguyen Hoang Phuc Hau

    jose2250’s picture

    When adding a menu (1st option (multiple menus)), NO, I don't have the Language combo box to choose a language.
    When adding content to the site, YES, I do have the Language combo box to choose a language.
    Any idea why? Thanks!

    yusuf_cse’s picture

    well tutorial but i don't see translation of content when i selecting the france or italian language. One thing, should i post different content for different languages? i have posted in English and want to automatic translation when i click on language selector.

    auris’s picture

    You have to write the content in all available languages you have. You have to search for something else (e.g. google translate) if you need automatic translation.

    farlight’s picture

    I have the same problem as jose2250, the language combobox doesn't showup when I'm adding or configuring the menu items, so if anyone have any idea why it would be most appriciated!

    auris’s picture

    You don't have language combo box in your new menu, in drupal's menus (e.g. navigation) or both.

    I couldn't reproduce your problem.

    farlight’s picture

    Yeah, what I don't have is:

    Ok, you now have your menus. Let's display them.

    I'm missing any "multi-language" option/tab as stated in Step 5.

    2nd option (one menu)

    I'm missing the combo-box in Step 7.

    New or old menu items, none has these.

    Using Drupal version 6.14 if it helps.

    Thanks for helping.

    farlight’s picture

    So, no luck here I guess. Another question is if the "promote to front page" also get translated depending on domain name (haven't been able to test it yet)?

    EDIT: I got it working, for some reason the i18n wasn't complete in my case. Thanks anyways! :)

    tergra’s picture

    Thanks heaps for this. Setting multi-languages with drupal is so painful and hard instead. Thanks again for all these indications. :-)

    soshial’s picture

    My intention was to enable multi-lingual interface only for drupal built-in interface ("my account", "administration", nodes, commenting and so on) without any additional prefixes, which relies only on user language preferences. But it just doesn't work.

    I did this:
    1. I installed internationalization, locate, translation modules
    2. I added the secondary language in settings
    3. I have downloaded and put the translation files into drupal directory

    It works when I use with prefix and does not work when with "None" setting.

    Thanks for your help in advance.

    renzomassaro’s picture

    Hello,

    Thanks for the tutorial.
    Everything works great however on the homepage the translation is nog working. When I go to another language on the homepage the error The requested page could not be found is there.

    Is this a known issue with homepage?

    dk7z’s picture

    no Language combo box when creating menu. When creating page or story, language combo box is present. Very strange. Drupal 6.20

    SafiPeti’s picture

    Thanks for this tut, it is really clear, straight and very helpful!

    astutonet’s picture

    Excellent tutorial!

    I'm starting with Drupal and I managed to get excellent results with this tutorial.

    With a few hours, I managed to create a multilingual site, without much difficulty.

    But I have a beginner question: how do I create a frontpage for the second language, or each of the areas that are in another language?

    The homepage of my site was built with views, taxonomy and pages (admin/build/pages). I don't need a page with the same complexity as the main language, but I need a frontpage for the second language.

    Does anyone know how I can do this?

    Thanks.

    Astuto (Sergio)

    Vayira’s picture

    Languages are no longer tarballs & all the documentation & video tutorials etc are way out of date. I've never been able to find the new procedure

    bdtushar’s picture

    I m using bengali language. but problem with date and time. how can I solve this?

    wooody’s picture

    Thanks auris for your nice explain .

    DuyAnh’s picture

    Hello.
    Thank you mevry much for the very detailed guide, which helped me much up to drupal 7.8
    There are some changes after I updated to version 7.10 and update every translation using translation update module.
    Now I cannot find out translate link on my basic page. There IS one on article page anyway, and I have checked to make sure the multiple laguage setting on both article and basic page content types are identicle. What have I missed?

    The next steps are to make multilingual content.
    1.Enable Multilingual support for all content types you want (admin/content/types)
    •Choose edit for the content type you want (e.g page)
    •In the Workflow settings choose Enabled, with translation and save

    It seems there is no such option in drupal 7.10, or is there, where?
    When I add an "Article" content, I can translate it, but when I add a "Basic page" content, there is no TRANSLATE or SAVE and TRANSLATE link anywhere. Please help. I need that, but dont know where to enable it. Any suggestions appreciated!

    DuyAnh

    gevorg’s picture

    Facing the same issue... Would appreciate an updated guide as well!

    Real Estate License Exam Tutor

    germanlogos’s picture

    Thanks for the tutorial. Posicionamiento web

    keerthyvijay’s picture

    sir , i did the steps to make multilanguage as per the above explanation but when an article is added the language to that article is not changing.and also i havent seen the workflow seeting .can u help me to solve the problem

    germanlogos’s picture

    Languages are no longer tarballs & all the documentation & video tutorials etc are way out of date. Hostal en barcelona

    Junesun’s picture

    I have a multilingual Drupal 6 site where most content is not translated into all the site's languages, so that visitors often see links to English-language articles despite selecting a different language. I use path-based negotiation and I had the problem that after a visitor reads a foreign-language article and clicks "Home" again, he is then on the "/fr" or whatever home page and all the article links are broken because they try to find English-language articles in with a fr/ prefix.

    I'm not sure where those bad article links are generated, Drupal is really intransparent, but I fixed the issue by re-writing the language prefix in my theme's node.tpl.php:

    <?php
          
    // ugly hack because $node_url is wrong when site is viewed in a language other than the node language
          
    $arr = explode("/", $node_url, 3);
          
    $lang = $arr[1];
           if ((
    strlen($lang) == 2) || ($lang == "zh-hans")) {   // basic test for language codes; necessary because not every node will be language-specific
            
    $real_path = $arr[0] . "/" . $node->language . "/" . $arr[2];
           } else {
            
    $real_path = $node_url;
           }
            <
    h3 class="title"><a href="<?php print $real_path; ?>
    " title="<?php print $title; ?>"><?php print $title; ?></a>
    Santhosh Kalla’s picture

    Thanks for this excellent tutorial.

    Vako’s picture

    Is there a way to display the language selection section horizontally and without bullets? no matter in which block region I put it, it displays in a vertical sequence and with bullets.

    Excellent Tutorial, thanks.

    francescosciamanna’s picture

    Is there a way to switch automatically to different theme according to the language selection of Internationalization Module? I am wandering all the community for without any result so far.

    Jaypan’s picture

    If you are using Drupal 7, you can implement hook_custom_theme();

    <?php
    function hook_custom_theme()
    {
      global
    $language;
      switch(
    $language->language)
      {
        case
    'en':
          return
    'english_theme'; // Replace with actual key for theme

       
    case 'ja':
          return
    'japanese_theme';
      }
    }
    ?>

    Note that both english_theme and japanese_theme would need to be enabled for the above to work.

    Larkach’s picture

    When trying to follow node/number structure, all my menu gets messed up. Also, even though I've selected language choosing menu in header it still doesn't appear. I am using Business theme if that helps. Any help would be appreciated

    reanim888’s picture

    Thanks a lot for this great tutorial... But please help me in one small issue... When I am adding translated content for a post all available language for that post is getting listed. Please help..