Set Up a Multilingual Web Site
Set Up a Multilingual Web Site
  • Matthew Weigand
  • 승인 2009.09.25 16:40
  • 댓글 0
이 기사를 공유합니다

The default Drupal language icons-enabled switcher looks like this

This How To section of articles have most often dealt with web site-related activities. This is simply because the author does not know how to do anything else. However, when it comes to multilingual web sites, he knows what he's talking about.

A good multilingual web site has the same content and the same layout, but in multiple different languages. A good multilingual web site allows users to switch between languages on the fly, if the users happen to be bilingual or multilingual themselves. A good multilingual web site offers support for web site administrators to translate the content into all the languages of the world, and add or drop languages on the fly.

Drupal is a popular web site content management system here in the How To section. The Korea IT Times uses it on its own web site, and so this author has the most experience with it. But the reason it was chosen in the first place is because of its flexibility and power it has to deal with almost every possible web site requirement. One of the requirements it deals with most elegantly is internationalization - the process of making a multilingual web site.

Lets start by assuming that your web site is already Drupal-based, since you have been following these other How Tos all along. Most of the functionality needed for this exercise is already contained within Drupal, but there is one module that must be downloaded - the i18n, or internationalization, module. (Incidentally, the abbreviation i18n stands for internationalization, but replaces the 18 letters between the first and last letters with the number 18. This is 1970s geek speak.) You must download the l18n module, unzip it, and upload it to yourdomain/sites/all/modules/. Then turn it on in your Drupal site's module management page. This module adds an entirely new section to the module admin page, the Multilanguage section. Turn on all of the modules in this section. You should also go to the Core - optional section and turn on the Path module, as it will become very useful in the future.

Second, you should navigate to admin/settings/language, which gives you the language administration page. You should see one language there, the default language that you started with. You can simply click on the Add Language link to select from most of the world's languages and add their support to your site. After you are done, select Configure and determine how to identify languages. Select "Path prefix with language fallback."

Path Prefix Language Selection

These modules act in a very predictable way. You can select the language that you are viewing just by including a language abbreviation in the URL of the web site. Say, for instance, that your front page was If you were to install German language support for your page, you could then manually type in The "de" part of the URL tells your web site that you're looking for German, and then it will automatically bring up the German-language version of your web page. This is automatically set up for every page on your web site at the moment you choose to install another language on the Languages page. This is called the Path Prefix method of language determination. If a user uses a path prefix that you have not put on your web site, the "with language fallback" part of the option you selected will display the default language instead.

However, we are not yet done. We also must identify which types of content in the web site are suitable for translation, and what language each piece of content is in. Navigate to /admin/content/types on your web site, where you can see all the types of content that can possibly be translated. Some types of content, such as images or video, cannot be translated, so if you have them you can safely ignore them. Web pages and stories, however, are most likely text, so they are the target of our adjustments. Edit the content type you wish to adjust, and then scroll down to Workflow settings. There will be a sub-category under that called "Multilingual support." Select "Enbaled - with translation" for that section, and then save the content type. This identifies which types of content are suitable for translation. Repeat the process for any other type of content you wish to translate.

The other step, identifying which pieces of content are in which language, comes next. Navigate to each piece of content on your web site and select the "edit" option. You will see a new entry on the edit form called "Language:". By default all content is set to language neutral, and this content type cannot be translated. However, you can change the content type to English, or German, or Korean, and then save the content. After that, a new menu item will appear near the top of the page, next to the "Edit" button, called "Translate". When clicking this men item, you will be shown a list of all the translations of this page for all enabled languages on the site. If some content is not translated, it will give you the option "add translation." By clicking on this option, you will be taken to a new editing window in which you can translate the details of the original document. When you are done, simply press save, and a new translation of the page will be created. This translation can be accessed manually by simply prefixing the address of the translation with a language abbreviation as illustrated previously.

Language Switcher

Now, translations can be added and accessed, but there is one step missing. A user must be able to select which language that they want to use. This is done by adding the language switcher block to your page layout. The language switcher block was added when you added in the l18n module, but it must be manually placed on your page's layout before it becomes accessible to your users. Simply navigate to /admin/build/block, your block placement interface, and find the language switcher among the crowd of Disabled blocks at the bottom of the page. Move it to its new location on your block area, and then press save. Your languages will now be available for clicking.

You might want to have some fancy flag icons for your languages, rather than just the name of the language in that language. If so, you can simply search for the Language Icons module on Drupal, download it, install it, and turn it on as we have just done for the l18n module. It will provide flags next to the language names, for that extra flashy look.

And that's it. You're done. That really wasn't so difficult, and in fact was actually pretty easy. Drupal is designed to be as easy and quick as possible for web site owners, which is why this column still talks about it to this day.

삭제한 댓글은 다시 복구할 수 없습니다.
그래도 삭제하시겠습니까?
댓글 0
계정을 선택하시면 로그인·계정인증을 통해
댓글을 남기실 수 있습니다.

  • Korea IT Times: Copyright(C) 2004, Korea IT Times. .Allrights reserved.
  • #1206, 36-4 Yeouido-dong, Yeongdeungpo-gu, Seoul, Korea(Postal Code 07331)
  • 서울특별시 영등포구 여의도동 36-4 (국제금융로8길 34) / 오륜빌딩 1206호
  • * Mobile News:
  • * Internet news:
  • * Editorial Div. 02-578-0434 / 010-2442-9446 * PR Global/AD: 82-2-578-0678.
  • * IT Times Canada: Willow St. Vancouver BC
  • 070-7008-0005
  • * Email: