Drupal 6 multilanguage support

Drupal 6 multilanguage support :

0) Install multilanguage support for Drupal 6
1) Multilanguage support for Normal Page node or Panel node
2) Multilanguage support for Site map (by using panel)


0) Install multilanguage support for Drupal 6 :

Download Install following modules :
i18n-6.x-1.10 – Modules to extend Multilingual capabilities for Drupal
language_sections-6.x-2.5 – if you need different languages in a text area
lang_dropdown-6.x-1.7 – a more friendly language switcher
– Your second Language translation , my case is Traditional Chinese : Ref

In the Multilanguage – i18n section enable all available options :
i18n-1.JPG
To see the translation of drupal environment, extract the language files under drupal directory :

cd /user/data/webuser/drupal/mysite/
tar xvf zh-hant-6.x-1.5.tar.gz

Ensure zh-hant.po is placed inside “/user/data/webuser/drupal/mysite/profiles/default/translations”

Now configure enable the “Traditional Chinese” in drupal Languages :
administer -> Site configuration -> Languages :
i18n-3.JPG
Language Negotiation set to “Path Prefix only.”

i18n-4.JPG

i18n-5.JPG

Then enable multilanguage support for different content types for page and panel , by going to http://yoursite/admin/content/types or

Administer -> Content Type -> [Page , Panel ]-> edit -> workflow -> Multilangual support : “Enable , with translation”
i18n-2.JPG

Then go to Adminster -> Site building -> Block (http://yoursite/admin/build/block) to enable language switcher in the left sidebar :
multi-9.JPG


1) Multilanguage support for Normal Page node or Panel node

To create panel with language tab , go to Node add -> Select Page (http://yoursite/node/add/page) -> Select your first Language of the page , e.g. English, input your content , and then save it :
multi-6.JPG
Go to Translate tab :
multi-7.JPG

Click “Add Translation” for second language version of the page node
multi-8.JPG

Create the content the chinese version of the page :

multi-9.png

Now test by accessing the page node , by changing language of language switcher in leftside bar , you will see corresponding language version of the page node.

For Panel with multilanguage support, do it similarly , except the create a node as “panel” instead “page”

2) Multilanguage support for site map (by using panel)

Create a panel for sitemap multilangual support
Download and Install sitemap module in Drupal 6 :
Afterwards, you can access your site’s site map by http://yoursite/sitemap

To enable multilanguage support for sitemap , you need to encapsulate the sitemap inside a panel . Now create a panel : Node/add (http://yoursite/node/add/ )-> create Panel :
multi-10.JPG
Then New custom content
multi-11.JPG
and paste the following code into php code :
multi-12.JPG

Note : Since you need to key in php code, so ensure you have enable the php input format as another input method (other than HTML ) by enabling “php filter” module in core :
multi-13.JPG

References : Ref1 Ref2

You may also like...