Localize the gallery content ...

dr_gaston

Joined: 2003-08-18
Posts: 4
Posted: Mon, 2003-08-18 05:09

Hi all,

Having a localized version of the Gallery software is great ... but still, when you fill in the album names, photo title, description or custom fields for your gallery you are using a single language.

Therefore, say you are creating an album titled "Mes vacances au bord de la mer" (French), when an American guy visits your site, he still sees "Mes vacances au bord de la mer" (which probably means guiberish for him).

Hence a suggestion: let users enter titles and descriptions in multiple languages.

This could be easilly done using the existing data structure and a separator for the different languages, per example:

"Mes vacances au bord de la mer |en_US:My vacation by the sea".

Hence gallery would select "My vacation by the sea" if the interface language is 'en_US', and "Mes vacances au bord de la mer" otherwise (default language).

Simple it is ... and easilly implemented to with a 10 lines function and a few modifications in the albums.php, view_albums.php and view_photos.php scripts. Moreover, users do not have to change anything in their gallery data, just add translations as they have time to.

A demo is available at: http://art.baudard.net.

It lets you switch languages on the fly using the top-left flags, and you will see the gallery name, album names, photo titles and all custom atgtributes are translated on the fly (please be patient as I do translate all data ...).

You can get back to me if you are interested with the hack, I will send you detailled instructions.

Bharat, is this something you would consider for the next release (multi-language) of Gallery?

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Tue, 2003-08-19 10:55

Thanks for this, caused much discussion amongst the developers.

Have not decided how or if we will do something like this, but if we do it will require a more sophisticated interface - trust me, a lot of people couldn't get the format right.

What you might want to do is update to 1.4 (the first officially multiilanguage version of gallery) and then share your changes as a patch in the customization forum - with a reference to that posting here.

 
dr_gaston

Joined: 2003-08-18
Posts: 4
Posted: Thu, 2003-08-21 07:03

Joan,

Would you be willing to offer a full user interface around localization? This could mean having different text inputs for different languages for each field on each entry panel, together with 'add a language' buttons everywhere ... would probably be very messy in the end.

The proposed method, if not totally intuitive, is quite simple to get used to from a user perspective. Moreover, as most of the text fields are multiline, it is quite easy to enter each localization on a separate line, as per example ('screenshot of edit title window'):


         Edit the title and click Save when you're done.
      ---------------------------------------------------------
       Mes vacances au bord de la mer
       |en_US: My vacation by the sea
       |de_DE: Mein Urlaub am Rand des Meeres
    
      ---------------------------------------------------------
                            [Save] [Cancel]

This saves a lot of screen estate, is simple to understand from a user perspective, does not modify Gallery GUI in any way. The only 'price' to pay is the a quick parsing of all fields before displaying them on visualization pages (as opposed to entry/modification pages).

Probably what we could do to further simplify is 'alias' the language codes to maybe the first two letters, so '|fr:' would match all variations of French by default.

Is the 1.4 released yet? I have not seen it in the official download page. I can also send you the mods via email (mine is gallery at ganivet dot net if you wish to pursue this thread by email).

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Fri, 2003-08-22 19:47

Look, I think this is great, and I'd use it myself! But still, I don't want to release it - yet.

Please build the patch when you have upgraded to 1.4 (RC1 out today!), and share it on the SF site.

 
Embo

Joined: 2003-11-07
Posts: 17
Posted: Sat, 2003-11-08 21:15

New to Gallery, and having no experience with PHP programming (or the time to learn it), I was just wondering if there has been any progress on this issue since the last posting (Oct 2002).

I see from thread http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=2844&start=0&postdays=0&postorder=asc&highlight=different+languages that the developers are not planning to include this multi language feature any time soon, but since more than a year has gone by since then..

Is there a patch around that does approximately what dr_gaston here suggests? I tried to go to the url he mentioned, but it was blank.

Do I have to wait until G2.1 (or later) for such a feature?

Thanks,

--
Embo

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Sat, 2003-11-08 21:49

Um, I joined this web site in Oct 2002 (happy anniversary to me!) but that posting was just in August. And no, we haven't made any decision about this yet.

 
Embo

Joined: 2003-11-07
Posts: 17
Posted: Sat, 2003-11-08 22:03

Oh, sorry, I guess my eyes crossed the screen a little too fast there ;)

Thanks anyway!

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Sun, 2003-11-09 10:59

that's ok - I do that all the time. I just knew for sure I didn't start laying down the law about gallery development just after I first downloaded it.

:-)