Project navigationRecent blog posts
Cameron at Spam v. FreedomCameron at GreenCommons.orgCameron at Not WindozeNavigationUser login |
Provide Multi-Lingual Content on Your SiteWe live in a complex world and Green candidates are campaigning in multi-cultural districts. There are at least 147 languages spoken in Dekalb County Georgia alone. Your community may not be quite that diverse, but most communities in the United States sport at least two or a few languages as immigrants, both new and old bring and keep alive not only their faiths and customs but also their languages. When we set up your website, if you prefer, we can provide you with the capability to provide multi-lingual content to the voters who browse your site. Providing multi-lingual content requires that we patch the base code to accomodate this requirement. That also means that the core code running your site will be somewhat older and more difficult to upgrade as new versions come out. But if your community speaks Spanish and English, or French, Farsi, Tonga or Tamil or some other language, this can be an obvious trade-off to make. Your website won't automatically translate your content for you. That still takes real live humans who know both languages involved. But we can provide a framework for you to publish your campaign's content in the multiple languages which make sense in your community. After you have checked with us to ensure that we're hosting your site on our MultiLingual enabled code base, a few simple steps can get you on the way. As usual when adding new functionality to your site, you want to start at: admin/build/modules. When you get there, enable the Locale Module, which is described as "Enables the translation of the user interface to languages other than English." While you are here, make sure that Menu and Taxonomy are also enabled. If you will be using Views, you can go ahead and enable that as well. That is only the first step. And it won't provide links for multi-lingual content, but it will let you install translation files used to translate each snippet of instructions which our content management system provides for administrators and end-users. Next use the admin/by-module page to access first the admin/user/access#module-locale page where you can make sure that your administrative users role can administer the translations for the user interface. Then link to: admin/settings/locale, where you can provide for each language you wish to support. With the Add Language tab, go to admin/settings/locale/language/add and use the form to add an existing or a custom language. Back on the Localization -> List page, enable your new language. Then use the import tab to get to the admin/settings/locale/language/import page. That page will provide a link to: http://drupal.org/project/translations, where you can download a copy of the translation files for each language you enabled. Be sure to choose the drupal 5.x version of the translation files. Use a tool appropriate for your OS to decompress the translation. (On windows, try 7-Zip at: http://www.7-zip.org/). Then use the form on the admin/settings/locale/language/import page to upload in turn each .po file extracted from the archive. When you've done this, you can change the default langauge and see the user interface translated after submitting the form. Switch it back and go on to the next step. Go back to the admin/build/modules page, again. This time enable all seven modules in the Localizer section. If you won't be using Views, you can leave the Localizer Views module unchecked. Submit this form to save these changes. Next use the Administer -> User Management -> Access Control menu option to get back to the admin/user/access page. Once there give every user role 'access localizer' privileges and your site administrators' role the 'administer localizer' privileges. Now, back to the menu to follow this path: Administer -> Site configuration -> Localizer. That should get you to the page at: admin/settings/localizer. Use this form to set the basic configuration options for your multi-lingual support. Enable Multi-Lingual support, review the other default settings and submit this form. When you do 'Save Configuration', additional options will appear once the page has refreshed. Review those options as well and choose the languages you want to display for each user role 'Multilingual content display options'. If you want to use the 'Switch by hostname' option, that will require additional configuration by our server administrator. You'll need to give us a call (using the phone numbers in the footer) to make that happen. But you can get the process started without it. Save this configuration again. Now use the Administer -> Site Building -> Blocks menu to go to the admin/build/block page. Enable the 'Select language' block, choosing a region and weight for it. Then use the 'Save Blocks' button at the bottom of the form. Now, choose an alternate language from the menu and make sure that the CMS' stock menu items and get appropriately translated. Switch back if necessary to continue. Now we're ready to add some translated content. With your site configured in this way, every time you Create Content, you should get a 'Locale:' selector at the top of the content entry form. Set the langauge for this node and enter your story or event or other content as you normally would. Now after you submit your new content, you will now see a new 'Translations' tab on any node you can edit. You can use that tab to offer a translation in another language, which will be linked with this node, so that when folks switch from one language to another, your content will be translated just as the user interface is. But before you hand this over to a translator, go ahead and use that tab to create a new node to contain the translation. By default it will contain the copy from the un-translated node. And your translator can work directly in their browser, translating your existing content one sentence and paragraph at a time. And until they do, those browsing the Spanish language version of your site will see the untranslated content in English. (Or whatever languages apply to your site).
Submitted by admin on Wed, 2007-09-26 02:49. admin's blog
|