Sunday, November 22, 2015

Change Current Website Language in Drupal


Drupal is an open source Content Management System based on PHP for creating a website to easily manage content, user and pages for development. For each site language is most important according to website locality and information.
When you install new Drupal than must display selection for choose site language. From there you can select language and create website in that language, but if you create website in English and then after you want to convert that into another language then you can easily convert using the Drupal admin panel.
Here below given example for convert English to French. Just follow as below steps for all other language translation.
  • First login to Drupal admin panel if not login (using http://www.yourdomain.com/user or http://www.yourdomain.com/admin)
  • Go to Modules and enable `Locale` module from CORE modules if disable.
  • Go to Configuration-> REGIONAL AND LANGUAGE-> Languages where display list of all installed languages.
  • Click on `Add language` link at top.
  • Select `PREDEFINED LANGUAGE` from selection and click on Add Language button (For French select "French (Français)") after installation success message display there.
  • Now go to http://localize.drupal.org pick language and click on co there button (for French click French and click on button on sidebar)
  • From there display language po file according to Drupal version in Drupal core download that according to your Drupal version (Ex. Download 7.XX for Drupal 7.XX version)
  • Go to Configuration-> REGIONAL AND LANGUAGE-> Translate interface in Drupal admin panel.
  • Click on Import tab at top of page.
  • Now choose po file download from Drupal localize with associate Drupal language.
After importing file new language installed into your Drupal website.configure language from Configuration-> REGIONAL AND LANGUAGE-> Languages and set French as default instead of English for complete website and its content translate into English to French.
In Translate interface Translate tab you can see all core words translation into local language. Here you can change that translation word according to use. During coding whoever you add new text with using `t('XXX')` than XXX word display there for translation. See below video for translating Drupal website one language to another language.

1 comment :

  1. Hi there! If interested in creating a multilingual Drupal website, I suggest to have a look at https://poeditor.com/ which is an online localization tool that can simplify your workflow.

    ReplyDelete