Language not changing

homer123

Joined: 2004-10-13
Posts: 15
Posted: Mon, 2004-11-29 04:04

Hi
I just installed the latest version (actually the verion on 11/26) on my website. I logged in as admin and changed permissions so that everyone can change their language. Now when I change the language in the main gallery page using the drop down box nothing changes. Is this a mistake on my side reg fonts.

The website is www.instrus2k.com/g2/gallery2/

Thanks

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2004-11-29 21:32

It may be that other locales are not installed on your system (even though you have gettext in php).

Quote:
"using debian" the locales not all installed by default...
so u need to install the one u need...

>apt-get install debconf
>apt-get install locales
>dpkg-reconfigure locales

then choose all the one u need to install... should work

bharat, can we detect this condition and display a message in site admin?

 
homer123

Joined: 2004-10-13
Posts: 15
Posted: Mon, 2004-11-29 22:12

Could you explain more.

Is this something I did not install in g2 or something on the server side of things. How do I check this ?

I do have the po files for all the languages.

Thanks

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2004-11-30 01:43

You have everything for G2.. your server/OS must support locales.. what OS are you using?

 
homer123

Joined: 2004-10-13
Posts: 15
Posted: Tue, 2004-11-30 01:49

Here is the output of uname -a

Linux yoda.hyperdryve.net 2.4.21 #1 SMP Tue Aug 26 23:01:04 EDT 2003 i686 GNU/Linux

It runs Debian Sid.

Its a frnds server btw. I have limited access to it. How do I check if I have locales enabled ?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2004-11-30 04:20

Do ls /usr/share/locale What do you see there? I see:

af/     bs/           en@quot/  eu_ES/  hu/  locale.alias@  ne/     ro/       ta/       zh/
am/     ca/           en_CA/    fa/     ia/  lt/            nl/     ru/       th/       zh_CN/
ang/    cs/           en_GB/    fi/     id/  lv/            nn/     sk/       tk/       zh_CN.GB2312/
ar/     cy/           en_RN/    fr/     is/  mi/            no/     sl/       tr/       zh_TW/
az/     da/           eo/       ga/     it/  mk/            no_NO/  sp/       uk/       zh_TW.Big5/
az_IR/  de/           es/       gl/     ja/  ml/            or/     sq/       uz/
be/     de.UTF-8/     es_AR/    gu/     kn/  mn/            pa/     sr/       uz@Latn/
bg/     el/           et/       he/     ko/  mr/            pl/     sr@Latn/  vi/
bn/     en/           et_EE/    hi/     lg/  ms/            pt/     sr@ije/   wa/
br/     en@boldquot/  eu/       hr/     li/  nb/            pt_BR/  sv/       yi/
 
homer123

Joined: 2004-10-13
Posts: 15
Posted: Tue, 2004-11-30 05:54

Hi Bharat
I see
kkd@yoda:~$ ls /usr/share/locale/

C             en_GB         hr            nn            tr
az            eo            hu            no            uk
be            es            id            pl            vi
bg            es_AR         is            pt            wa
ca            et            it            pt_BR         zh
cs            et_EE         ja            ro            zh_CN
da            eu            ko            ru            zh_CN.GB2312
de            eu_ES         lg            sk            zh_TW
de_AT         fi            locale.alias  sl            zh_TW.Big5
el            fr            lt            sp
en            ga            ms            sr
en@boldquot   gl            nb            sv
en@quot       he            nl            th
kkd@yoda:~$
 
schultmc
schultmc's picture

Joined: 2003-05-21
Posts: 108
Posted: Wed, 2004-12-01 16:13

What is in /etc/locale.gen? It sounds to me like you don't have the corresponding system locales installed. To get i18n/l10n working in gallery you need to have both the .po files and the system locales.

http://people.debian.org/~schultmc/locales.html may be helpful (your friend may need to look at that site if you don't have root access).

 
baschny
baschny's picture

Joined: 2003-01-04
Posts: 328
Posted: Thu, 2004-12-02 15:31

Usually "locale -a" prints out a list of installed locales. Does that work on Debian? It would be cool if we could add this kind of check to G2 (maybe php based?), so that we just present the locales that are truely installed.

 
schultmc
schultmc's picture

Joined: 2003-05-21
Posts: 108
Posted: Thu, 2004-12-02 18:28
baschny wrote:
Usually "locale -a" prints out a list of installed locales. Does that work on Debian? It would be cool if we could add this kind of check to G2 (maybe php based?), so that we just present the locales that are truely installed.

locale -a works on my Debian machine.

 
loyukfai

Joined: 2004-11-29
Posts: 58
Posted: Thu, 2004-12-09 20:26

I'm now facing the same problem, that the language is not changing. I contacted the hosting company (GoDaddy.com) and they said it's not their problem. I also checked their phpinfo and gettext is enabled.

My installation is a stock A4. Is there anything I need to add or do, besides enabling the langauge selection in Site Admin, in order to enable translations support?

Thanks alot!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2004-12-10 00:14

before I answer, did you read this thread? just want to make sure, since it mentions some info about checking if locales are installed on your system.. what is your OS?
basically, even with gettext I guess localization doesn't work unless the locales are installed in the OS, though I don't really know why.

 
baschny
baschny's picture

Joined: 2003-01-04
Posts: 328
Posted: Fri, 2004-12-10 00:59

This sounds like something we could check in our code:

$new = setlocale(LC_ALL, 'asasas');
echo $new

=> nothing

$new = setlocale(LC_ALL, 'de_DE');
echo $new

=> de_DE

"Some" code should do that on all our supported language codes to see which ones we can allow the user to choose from. And maybe cache this somewhere (a core module property?).

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2004-12-10 04:25

cool, I was wondering if there was a way to check from php.. what happens in a windows environment?

 
loyukfai

Joined: 2004-11-29
Posts: 58
Posted: Fri, 2004-12-10 04:40

Yes, mindless I did read the thread, but I have no shell access to GoDaddy.com's servers so I'm not sure how to carry out the instructions. Any idea?

P.S. GoDaddy.com's hosting services aren't very user-friendly with G2 anyway, so I may consider a switch later...

 
loyukfai

Joined: 2004-11-29
Posts: 58
Posted: Mon, 2004-12-13 20:23

Seems GoDaddy.com has put in the necessary changes, the language now changes correctly.