Bric::Util::Language(3)

NAME
Bric::Util::Language - Bricolage Localization

VERSION
$LastChangedRevision$

DATE
$LastChangedDate: 2006-03-28 06:51:06 +0200 (Tue, 28 Mar 2006) $

SYNOPSIS
To follow

DESCRIPTION
To follow

ADDING NEW LANGUAGES

•   Add new Bric::Util::Language subclass, named for your language code with dashes changed to underscores and all lowercase letters. For example, en-US would be "en_us". This will be known as the "key" for your language. Add the constant "key" to your new subclass and have it return the key.

•   Copy the localization messages from Bric::Util::Language::de_de into your new subclass and change the German translations of the English words and phrases into your language. Be sure to use the UTF-8 character set.

•   Add your name to comp/widgets/help/translators.html for your language.

•   Copy contrib/button_gen/bric_buttons.de_de.txt to a new file named with your language key substituted for "de_de". Translate the button labels in your new text file. Make sure that the character set you use is supported by the Gimp. Then run the scripts to generate the buttons (or ask someone on bricolage-devel to do so) and put them into a new subdirectory in comp/media/images named for your language key.

•   Create a new subdirectory in comp/help named for your language key. Copy all of the subdirectories and files from the comp/help/en_us directory to your new language directory and translate them. Be sure to use the UTF-8 character set.

•   Copy comp/media/js/en_us_messages.js to a new JavaScript file named with your language key substituted for "en_us". Translate the JavaScript messages in your new JavaScript file. Be sure to use the UTF-8 character set.

•   Copy comp/media/css/en_us.css to a new CSS file named with your language key substituted for "en_us". Add any CSS that your langauge requires, such as special fonts, right-to-left text, font sizes, etc. Many languages will require no special CSS, in which case you can leave your new CSS file empty.

•   Add an "INSERT" statement to sql/Pg/Bric/Util/Pref.val.

•   Write a migration script to add the new language key to the database. It should go into a subdirectory of instup/upgrade named for the expected next version of Bricolage. Model it on inst/upgrade/1.10.2/add_ja.pl; all you need to is change all instances of "ja" to your new language key.

AUTHOR
Claudio Valente <cvalente@co.sapo.pt>

SEE ALSO