Skip to content
Sean Proctor edited this page May 15, 2013 · 3 revisions

Translation Guide

Introduction

This page contains the information on how to get localization working and how to update translations and create new translations.

Setup

Go to the admin page on your calendar site. Click on the "Translate" tab, then click the "Generate Translations" button.

Updating a translation

The translations are now handled through transifex.com. Visit https://www.transifex.com/projects/p/php-calendar/ for more to work on translations.

The following section is outdated, but if you don't want to use transifex, it's still useful.

If you find an error or omission in a translation, you can fix the translation. The translation files are located at: php-calendar/locale/{language}/LC_MESSAGES/messages.po

To generate a new version of the template, use xgettext. The command is something like: cd php-calendar; xgettext *.php includes/*.php

Merge the existing translation with the new template (if necessary). msgmerge oldmessages.po newmessages.po

Edit the messages.po file. http://www.poedit.net/ has an editor, or you can use a standard text editor.

Regenerate the translations from the admin panel of the calendar.

Creating a new translation

Visit https://www.transifex.com/projects/p/php-calendar/ to create a new translation.

The following section is outdated. It's no longer the preferred way of translating but still useful if you don't want to use Transifex.

Create the directory: php-calendar/locale/{language}/LC_MESSAGES where {language} is the 2-letter abbreviation for the new language.

Translate the untranslated messages.po file. See updating a translation for more information on this.

Put the translated messages.po file in the directory you created.

Regenerate the translations from the admin panel of the calendar.