Question about modules translations.

schhub

Joined: 2010-08-23
Posts: 7
Posted: Wed, 2011-02-23 10:50

Hope i'm posting in the good part of the forum.

I just wanted to ask how it is possible to "make" translation for module ImageBlock in gallery2.

I installed it and would be happy to translate it in french because for example in the left sidebar i see "Random image" over the random image instead of "Image aléatoire".
I looked in template and found this :

Quote:
<?php
$blocks['ImageBlock'] = array(
'description' => $gallery->i18n('Image Block'),
'vars' => array(
'blocks' => array(
'description' => $gallery->i18n('Image type'),
'type' => 'choice',
'default' => 'randomImage',
'choices' => array(
'randomImage' => $gallery->i18n('Random image'),
'recentImage' => $gallery->i18n('Recent image'),
'viewedImage' => $gallery->i18n('Viewed image'),
'randomAlbum' => $gallery->i18n('Random album'),
'recentAlbum' => $gallery->i18n('Recent album'),
'viewedAlbum' => $gallery->i18n('Viewed album'),
'dailyImage' => $gallery->i18n('Daily image'),
'weeklyImage' => $gallery->i18n('Weekly image'),
'monthlyImage' => $gallery->i18n('Monthly image'),
'dailyAlbum' => $gallery->i18n('Daily album'),
'weeklyAlbum' => $gallery->i18n('Weekly album'),
'monthlyAlbum' => $gallery->i18n('Monthly album'))),
'repeatBlock' => array(
'description' => $gallery->i18n('Number of items'),
'type' => 'text',
'default' => '1'),
'useDefaults' => array(
'description' => $gallery->i18n('Use default settings'),
'type' => 'boolean',
'default' => 'true',
'overrides' => array('showHeading', 'showTitle', 'showDate',
'showViews', 'showOwner')),
'showHeading' => array(
'description' => $gallery->i18n('Show heading'),
'type' => 'boolean',
'default' => 'true'),
'showTitle' => array(
'description' => $gallery->i18n('Show title'),
'type' => 'boolean',
'default' => 'true'),
'showDate' => array(
'description' => $gallery->i18n('Show date'),
'type' => 'boolean',
'default' => 'true'),
'showViews' => array(
'description' => $gallery->i18n('Show view count'),
'type' => 'boolean',
'default' => 'false'),
'showOwner' => array(
'description' => $gallery->i18n('Show owner'),
'type' => 'boolean',
'default' => 'false')));
?>

in /modules/imageblock/templates/blocks/blocks.inc file.

But now i don't know what to do to have this in french translation.
I'm looking at the right place to do something ?

Thanks in advance for your help.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2011-02-23 16:14

All core modules already have translations. You may have to install the multi-lang module.

otherwise:
http://codex.gallery2.org/Gallery2:Localization

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
schhub

Joined: 2010-08-23
Posts: 7
Posted: Wed, 2011-02-23 18:01

I have Multi-lang module installed but still some words are not translated, don't know what to do.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2011-02-23 18:45

You can edit the line 'randomImage' => $gallery->i18n('Random image'), to
'randomImage' => $gallery->i18n('Image aléatoire'),

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
schhub

Joined: 2010-08-23
Posts: 7
Posted: Thu, 2011-02-24 17:16

I tried it but nothing changed still seeing "Random Image", strange.

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Fri, 2011-02-25 07:24

Clear your caches.
Both on server and browser.

--
dakanji.com