{"id":1574,"date":"2012-05-22T15:27:06","date_gmt":"2012-05-22T07:27:06","guid":{"rendered":"http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/?p=1574"},"modified":"2012-05-22T16:18:15","modified_gmt":"2012-05-22T08:18:15","slug":"drupal-6-multilanguage-support","status":"publish","type":"post","link":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/?p=1574","title":{"rendered":"Drupal 6 multilanguage support"},"content":{"rendered":"<p>Drupal 6 multilanguage support  :<\/p>\n<p><a href=\"#0\">0) Install multilanguage support for Drupal 6<\/a><br \/>\n<a href=\"#1\">1) Multilanguage support for Normal Page node or Panel node <\/a><br \/>\n<a href=\"#2\">2) Multilanguage support for Site map (by using panel)<\/a><\/p>\n<hr \/>\n<p><a name=\"0\"><\/a>0) Install multilanguage support for Drupal 6 :<\/p>\n<p><\/a><\/p>\n<p>Download Install following modules :<br \/>\n&#8211; <a href=\"http:\/\/drupal.org\/node\/275705\">i18n-6.x-1.10 <\/a> &#8211; Modules to extend Multilingual capabilities for Drupal<br \/>\n&#8211; <a href=\"http:\/\/drupal.org\/project\/language_sections\">language_sections-6.x-2.5 <\/a> &#8211; if you need different languages in a text area<br \/>\n&#8211; <a href=\"http:\/\/drupal.org\/project\/lang_dropdown\">lang_dropdown-6.x-1.7<\/a> &#8211; a more friendly language switcher<br \/>\n&#8211; Your second Language translation , my case is  <a href=\"http:\/\/drupal.org\/project\/zh-hant\">Traditional Chinese<\/a> :   <a href=\"http:\/\/www.lullabot.com\/videos\/installing-drupal-translation\">Ref <\/a><\/p>\n<p>In the Multilanguage &#8211; i18n section enable all available options :<br \/>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/i18n-1.JPG' title='i18n-1.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/i18n-1.JPG' alt='i18n-1.JPG' width=200  class=photo \/><\/a><br \/>\nTo see the translation of drupal environment, extract the language files under drupal directory : <\/p>\n<blockquote>\n<p>\n   cd \/user\/data\/webuser\/drupal\/mysite\/<br \/>\n    tar xvf zh-hant-6.x-1.5.tar.gz\n<\/p>\n<\/blockquote>\n<p>Ensure zh-hant.po is placed inside &#8220;\/user\/data\/webuser\/drupal\/mysite\/profiles\/default\/translations&#8221;<\/p>\n<p>Now configure enable the &#8220;Traditional Chinese&#8221; in drupal Languages  :<br \/>\nadminister -> Site configuration -> Languages :<br \/>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/i18n-3.JPG' title='i18n-3.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/i18n-3.JPG' alt='i18n-3.JPG'   width=200 class=photo  \/><\/a><br \/>\nLanguage Negotiation set to &#8220;Path Prefix only.&#8221;<\/p>\n<table border=0>\n<tr>\n<td>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/i18n-4.JPG' title='i18n-4.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/i18n-4.JPG' alt='i18n-4.JPG' width=200 class=photo \/><\/a><\/p>\n<\/td>\n<td>\n<p><a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/i18n-5.JPG' title='i18n-5.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/i18n-5.JPG' alt='i18n-5.JPG' width=200 class=photo \/><\/a><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p>Then enable multilanguage support for different content types for page and panel , by  going to http:\/\/yoursite\/admin\/content\/types  or <\/p>\n<p>Administer -> Content Type -> [Page , Panel ]-> edit  -> workflow -> Multilangual support : &#8220;Enable , with translation&#8221;<br \/>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/i18n-2.JPG' title='i18n-2.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/i18n-2.JPG' alt='i18n-2.JPG' width=200 class=photo \/><\/a><\/p>\n<p>Then go to Adminster -> Site building -> Block (http:\/\/yoursite\/admin\/build\/block) to enable language switcher in the left sidebar  :<br \/>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-9.JPG' title='multi-9.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-9.JPG' alt='multi-9.JPG'  class=photo width=200 \/><\/a><\/p>\n<hr \/>\n<p><a name=\"1\"><\/a>1) Multilanguage support for Normal Page node or Panel node<\/p>\n<p>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 : <br \/>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-6.JPG' title='multi-6.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-6.JPG' alt='multi-6.JPG' width=200 class=photo \/><\/a><br \/>\nGo to Translate tab :<br \/>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-7.JPG' title='multi-7.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-7.JPG' alt='multi-7.JPG' width=200 class=photo \/><\/a><\/p>\n<p>Click &#8220;Add Translation&#8221; for second language version of the page node <br \/>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-8.JPG' title='multi-8.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-8.JPG' alt='multi-8.JPG' width=200 class=photo  \/><\/a><\/p>\n<p>Create the content the chinese version of the page : <\/p>\n<p><a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-9.png' title='multi-9.png'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-9.png' alt='multi-9.png'  width=200 class=photo \/><\/a><\/p>\n<p>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.<\/p>\n<p>For Panel with multilanguage support, do it similarly , except the create a node as &#8220;panel&#8221; instead &#8220;page&#8221;<\/p>\n<p><a name=\"2\"><\/a>2) Multilanguage support for site map (by using panel)<\/p>\n<\/p>\n<p>Create a panel for sitemap multilangual support<br \/>\nDownload and Install <a href=\"http:\/\/drupal.org\/project\/site_map\">sitemap module<\/a> in Drupal 6 : <br \/>\nAfterwards, you can access  your site&#8217;s site map by http:\/\/yoursite\/sitemap<\/p>\n<p>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 :<br \/>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-10.JPG' title='multi-10.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-10.JPG' alt='multi-10.JPG'  width=200 class=photo \/><\/a><br \/>\nThen New custom content<br \/>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-11.JPG' title='multi-11.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-11.JPG' alt='multi-11.JPG'  width=200 class=photo \/><\/a><br \/>\nand paste the following code into php code :<br \/>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-12.JPG' title='multi-12.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-12.JPG' alt='multi-12.JPG'  width=200 class=photo \/><\/a><\/p>\n<p>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 &#8220;php filter&#8221; module in core :<br \/>\n<a href='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-13.JPG' title='multi-13.JPG'><img src='http:\/\/www.se.cuhk.edu.hk\/~hmleung\/wordpress\/wp-content\/uploads\/2012\/05\/multi-13.JPG' alt='multi-13.JPG'  width=200 class=photo \/><\/a><\/p>\n<p>References : <a href=\"http:\/\/drupal.org\/node\/275705\">Ref1<\/a> <a href=\"http:\/\/www.lullabot.com\/videos\/installing-drupal-translation\">Ref2<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1575,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1574","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1574"}],"version-history":[{"count":0,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1574\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/1575"}],"wp:attachment":[{"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www1.se.cuhk.edu.hk\/~hmleung\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}