Translate Drupal modules | ZwahlenDesign

ZwahlenDesign

Real Free Open Source

Logo: Druplicon

Search

Navigation

  • Blog
  • Projects
  • Contact

Subnavigation

  • Book/Magazin Tip
  • Imprint

Languages

  • English English
  • German German

Text Size

  • Increase
  • Decrease
  • Normal

Current Size: 100%

Page Style

  • Black/White
  • White/Black
  • Yellow/Blue
  • Standard

Current Style: Standard

pdfreaders.org

Play Ogg

stopsoftwarepatents.eu petition banner

Drupal Association: Christian Zwahlen

Linuxcounter

Linuxcounter User #356114

Navigation

  • Recent posts

User login

  • Create new account
  • Request new password

Slug.ch.

Syndicate

Syndicate content

Who's online

There are currently 0 users and 81 guests online.

Home

Translate Drupal modules

Submitted by zwahlendesign on Fri, 2009-02-20 12:37

How to translate a Drupal 4,5 or 6 module?

1 The module have a POT file

The module have .po or .pot files in "/MODULENAME/po/" or "/MODULENAME/translations/".

  1. Enable the locale module and add a language under "admin/settings/language/add", "Languages".
  2. Download and install KBabel, Poedit or use a texteditor [1].
  3. Open the file with the suffix .pot from "MODULNAME/translations/" in Drupal 6 or "MODULNAME/po/" in Drupal 4 or 5, translate and save it as "LANGUAGECODE.po" (LANGUAGECODE is your language code. See: en.wikipedia.org/wiki/Language_codes).
  4. Make your translation availabe (under the GPL license) for other users. For example, submit your files to the module project page by create a issue http://drupal.org/project/issues/MODULNAME or contact the maintainer of the module.

KBabel screenshot

2 The module have no translations

The module have no .po or .pot files in "/MODULENAME/po/" or "/MODULENAME/translations/".

  1. Download and install the Drupal module Translation Template Extractor (POTX).
  2. Enable the locale module and add a language under "admin/settings/language/add", "Languages".
  3. Create a .po file: Go to "admin/build/translate/extract", "Translate interface" and select the module under "Directory "sites/all/modules"", and select "Template language" and "Template file for LANGUAGENAME translations" and "Include translations".
  4. Create a .pot file for other translators: Go to "admin/build/translate/extract", "Translate interface" and select the module under "Directory "sites/all/modules"", and select "Language independent template".
  5. Download and install KBabel, Poedit or use a texteditor [1].
  6. Open the file with the suffix .po from "MODULNAME/translations/" in Drupal 6 or "MODULNAME/po/" in Drupal 4 or 5, translate and save it as "LANGUAGECODE.po" (LANGUAGECODE is your language code. See: en.wikipedia.org/wiki/Language_codes).
  7. Make your translation availabe (under the GPL license) for other users. For example, submit your files to the module project page by create a issue http://drupal.org/project/issues/MODULNAME or contact the maintainer of the module.
  8. Import the new .po file under "admin/build/translate/import", "Translate interface" in your language.

[1] Translate with a texteditor

Example in German. Write the german text in the msgstr line.


msgid "English text"
msgstr "Deutscher Text"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • Login or register to post comments
  • German German

Just what we need for our

Submitted by Anonymous on Thu, 2011-03-03 07:12.

Just what we need for our project. Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • Login or register to post comments

Just what we need for our

Submitted by tom11 on Thu, 2011-01-20 07:08.

Just what we need for our current project. It's very applicable. Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • Login or register to post comments

Thanks a lot

Submitted by ashish.mehta113 on Fri, 2010-02-05 08:02.

Thank you very much for posting such a useful post.
keep on posting such items.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • Login or register to post comments

Follow me on Identi.ca

Follow Zwahlendesign on Identi.ca

Warning Digital Rights Management!

Warning Digital Rights Management!



© 2011 ZwahlenDesign.ch

  • Valid XHTML 1.0!
  • Valid CSS!
  • © Copyright 2008