« b2evo 2.4.5 "Monument Valley" released [STABLE]Back to work / Blogworld »

Language pack updates

Permalink September 7, 2008 @ 11:25, by Francois Planque • Category: Development

I have updated all 2.4 translations that were sent to me. You can download them from the language packs section.

If you have additional up-to-date language packs, please contact me directly.

If you want to create a new one, you're welcome to do so. You might want to use an existing language pack from a previous version as a start base though. It's up to you...

Finally, language packs in 3.0 will be essentially the same except that they will include definitions for the locales they can serve in a small file called for example fr-FR.locale.php. (A 3.0 language pack can actually define several locales at ounce by including several such files.) Those files will be detected by b2evolution and imported automatically.

This should make it even easier for users to install new locales. All they'd need to do is copy the files into the locales folder and then enable the desired locale from Global Settings > Regional.

Follow up:

The contents of the definition file would go like this:

PHP:

<?php
/**
 * Locale definition
 *
 * IMPORTANT: Try to keep the locale names short, they take away valuable space on the screen!
 *
 * Documentation of the keys:
 *  - 'messages': The directory where the locale's files are. (may seem redundant but allows to have fr-FR and fr-CA
 *                tap into the same language file.)
 *  - 'charset':  Character set of the locale's messages files.
 */
$locale_defs['fr-FR'] = array(
        'name' => NT_('French (FR)'),
        'messages' => 'fr_FR',
        'charset' => 'iso-8859-1',
        'datefmt' => 'd.m.y',
        'timefmt' => 'H:i:s',
        'startofweek' => 1,
    );
?>

1 comment

Comment from: Hotelier [Visitor] · http://www.hotelius.fr
Is it possible to use English as the main language for the console (backend) but displaying everything else in FR? It's tricky, I know, but that what I (we) need for a new website..
10/23/08 @ 11:28

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)