Multi-language setting - locale, translation
After setting ads, I thought that, being rarely known site, perhaps English content might be (at least slightly more) advantageous for exposure to the search engines. And as I remembered that I’d encountered with related topics in drupal documentations, I decided to set up a multilingual site supporting both Korean and English.
During this process, I’ve spent time longer than expected, and had to see the sources of drupal modules. I succeeded to set up a multilingual site, but failed to adjust a few details because of some bugs. Here I summarize it.
Following modules are required.
- locale (core)
- content translation (core)
- i18n (contributed)
What I’m trying to do is,
- set default language to Korean.
- add English translation to each content.
- select language (especially, without log-in).
Configuring Locale & Content translation
After enabling locale and content translation module, follow the process below.
- Administer > Site configuration > Languages
- At “Add language > Predefined language”, add Korean.
- At “Configure”, switch language negotiation to “Path prefix with language fallback”.
- At “List”,
- adjust weight (which determines order of languages in, e.g., language switcher block).
- edit Korean to set path prefix blank.
- edit English to set path prefix to “en”.
- Administer > Content management > Content types
- For each content types, switch “Workflow settings > Multilingual support” to “Enabled, with Translation”.
- Administer > User management > Permissions
- Set up “translate content” permission.
After that, legacy contents becomes language neutral, and each content becomes translatable (that is, “Translate” tab is added at each content’s page). You may leave legacy contents as language neutral, but I prefer to set those to languages actually used. Because path prefix of Korean was set blank, URL alias need not modified when target language is Korean. Not much contents there was, so I changed the language settings, one by one, at “Administer > Content management > Content”. (There is a contributed module which can bulk-update the language settings.)
Now, configure language switcher block.
- Administer > Site building > Blocks
- Move the language switcher block to appropriate region (in my case, left sidebar) and save.
Translating
Maybe it’s not true for all languages, but setting those i18n-related modules does not change any menu strings or messages. Still, you can translate yourself.
- Administer > Site configuration > Translate interface
- At “Search” tab, input any (case-sensitive) string to translate.
- Among search results which include the input string, edit the string in mind.
Otherwise, you can import translation files (e.g., Korean translation). I decided not to, because I may not like the choice of terms and many times the original text is clearer to understand.
- moonz's blog
- Login to post comments
- 한국어