Locale problems

axxi

Joined: 2006-03-10
Posts: 3
Posted: Fri, 2006-03-10 14:36

Hi

I'm using gallery2.0.2 on Apache/1.3.32 (Unix) (Gentoo/Linux) with PHP 4.3.11 (cli) (built: Jul 11 2005 03:30:41).

My output from "locale -a" is:

.oO(root@helena~) locale -a
C
POSIX
de_DE
en_HK
en_PH
en_US
en_US.utf8
nb_NO
nb_NO.iso88591
nn_NO
nn_NO.iso88591
no_NO
no_NO.iso88591
no_NO.utf8
.oO(root@helena~)

I can sucessfully change language to Deutsch (de_DE), but when i'm trying to change to "Norwegian Bokmal" (no_NO or nb_NO ?) (which i want to use) the language reverts back to english again. It seems like i'm missing some part at the locales or maybe kernel options? Any help whould be greatly appreciated, thanks.

Edit: gettext is supported and enabled in my php-package

 
strips

Joined: 2006-01-22
Posts: 21
Posted: Sat, 2006-05-27 12:43

See this thread: http://gallery.menalto.com/node/49678

You should be OK regarding your locales, but what are your environment variables?

What is LANG, LANGUAGE and LC_ALL set to?

just type "export" in shell to list the global variables.
________________
Regards
Stian H. Larssen

 
axxi

Joined: 2006-03-10
Posts: 3
Posted: Wed, 2006-12-06 12:15

I had no language specific environments, but i tried setting them up both globally in gentoo's environment files, and using the export-command.

km@amelie ~ $ cd asd
-bash: cd: asd: Not a directory
km@amelie ~ $ export LANG=nb_NO && export LC_ALL=nb_NO
km@amelie ~ $ cd asd
-bash: cd: asd: Ikke en filkatalog
km@amelie ~ $

So it seems to me the nb_NO is working fine, but I don't understand how gallery is using this though. I also tried export lang and lc_all to no_NO (which it seems like gallery is using) but then I didn't get any translations in my shell

km@amelie ~ $ export LANG=no_NO && export LC_ALL=no_NO
km@amelie ~ $ cd asd
-bash: cd: asd: Not a directory

I also tried setting all the no_NO values in my mysql-db to nb_NO to reflect my glibc (or locale-settings) and i also changed some lines i GalleryTranslator.class to:

118             /* XXX: Move this information into a configuration file */
119             /* Norwegian */
120             $supportedLanguages['nb']['NO']['description'] = 'Norsk bokmål';
121             $defaultCountry['nb'] = 'NO';

... and then I got some form of translations, but not all. And it seems very random. In opera i got translations, but when i tried in IE it suddenly didn't work. Maybe some cookie-related or cached, i don't know, but i have norwegian as default translation in my settings so shouldn't be login-specific.

RSS Feed for this Album
 
View Latest Comments

Are in english, but...

Dato: 06-01-2006 
Eier: km 
Størrelse: 32 objekter (20481 objekter totalt) 

... this is in norwegian.

If anyone has any clues or help, please reply. I whould love to get this sorted out.

Here is my info from gallery:

Henter systeminformasjon; nyttig for å kopiere/lime inn tekst i G2's brukerstøtteforum. 

Detaljer fra siste gjennomkjøring: 

Gallery-versjon = 2.1 kjerne 1.1.0 
PHP-versjon = 5.1.4-pl0-gentoo apache2handler 
Nettjener = Apache 
Database = mysql 4.1.19-log, lock.system=database 
Verktøy = ArchiveUpload, Exif, ImageMagick, Gd, Ffmpeg, NetPBM, Thumbnail 
Akselerasjon = partial/900, partial/900 
Operativsystem = Linux amelie 2.6.16-gentoo-r7 #1 SMP PREEMPT Fri May 19 21:02:16 CEST 2006 i686 
Standardtema = matrix 
Lokaltilpassing = no_NO 
Nettleser = Opera/9.00 (Windows NT 5.1; U; en)
 
axxi

Joined: 2006-03-10
Posts: 3
Posted: Sat, 2006-12-16 07:22

It seems like its working now. I had to copy/rename all "no" folders to "nb" in every module-folder, then purge caches, then wait some minutes and suddenly i got translations :)

 
strips

Joined: 2006-01-22
Posts: 21
Posted: Sun, 2006-12-17 02:28

I've come to the same comclusion.

I made a mini-howto here: http://gallery.menalto.com/node/49678#comment-213319
________________
Regards
Stian H. Larssen