Firefox PHP

Another lang-file running onto english OS

Posted by irob 
Re: Another lang-file running onto english OS
May 18, 2005 04:15AM
irob Wrote:
-------------------------------------------------------
> - the server is correctly configured.

I don't want to be rude, but how can you say that if you get wrong month names? Are the other working programs using the same way of accessing the locale data?

> - all licences are paid.

Good for you, doesn't help with the month names thou. Do you have Windows server? You could try using "portuguese' and 'german' for starters.

> plus: the languages of other softwares work very
> fine. It is only phorum5 which is confused.

It would be helpfull if you inform us a little bit more about your system.

If you have a unix variant you could for example list all the locales installed in your system.

locale -a

I think reading php manual for setlocale had good info too about the problem.



---
-=[ Panu ]=-
Re: Another lang-file running onto english OS
May 18, 2005 05:36AM
> > plus: the languages of other softwares work
> very
> > fine. It is only phorum5 which is confused.
>
> It would be helpfull if you inform us a little bit
> more about your system.
>
> If you have a unix variant you could for example
> list all the locales installed in your system.

It's US-english running on US-Server and the phorum-admin select another language for 1 forum. Then phorum5 does not convert the UNIX-Datenumbers of the phorum_table in the MySQL to the correct month-language. At the same time, I also posted you a first source-suggestion how to fix this bug in phorum-lang, see [phorum.org]

linux fedoracore 2.0 rel 2
bind 9.2.3-13
httpd 2.0.51-2.9
mysql 3.23.58-9.1
php 4.3.10-2.4
plib (installed lang):
drwxr-xr-x 2 root root 4096 Apr 27 12:45 ca-ES
drwxr-xr-x 2 root root 4096 Apr 27 12:45 de-DE
drwxr-xr-x 2 root root 4096 Apr 27 12:45 en-US
drwxr-xr-x 2 root root 4096 Apr 27 12:45 es-ES
drwxr-xr-x 2 root root 4096 Apr 27 12:45 fi-FI
drwxr-xr-x 2 root root 4096 Apr 27 12:45 fr-FR
drwxr-xr-x 2 root root 4096 Apr 27 12:45 it-IT
drwxr-xr-x 2 root root 4096 Apr 27 12:45 ja-JP
drwxr-xr-x 2 root root 4096 Apr 27 12:45 nl-NL
drwxr-xr-x 2 root root 4096 Apr 27 12:45 pl-PL
drwxr-xr-x 2 root root 4096 Apr 27 12:45 ru-RU
drwxr-xr-x 2 root root 4096 Apr 27 12:45 tr-TR
drwxr-xr-x 2 root root 4096 Apr 27 12:45 zh-CN


> locale -a

No problem:

ar_BH.utf8
ar_DZ
ar_DZ.iso88596
ar_DZ.utf8
ar_EG
ar_EG.iso88596
ar_EG.utf8
ar_IN
ar_IN.utf8
ar_IQ
ar_IQ.iso88596
ar_IQ.utf8
ar_JO
ar_JO.iso88596
ar_JO.utf8
ar_KW
ar_KW.iso88596
ar_KW.utf8
ar_LB
ar_LB.iso88596
ar_LB.utf8
ar_LY
ar_LY.iso88596
ar_LY.utf8
ar_MA
ar_MA.iso88596
ar_MA.utf8
ar_OM
ar_OM.iso88596
ar_OM.utf8
ar_QA
ar_QA.iso88596
ar_QA.utf8
ar_SA
ar_SA.iso88596
ar_SA.utf8
ar_SD
ar_SD.iso88596
ar_SD.utf8
ar_SY
ar_SY.iso88596
ar_SY.utf8
ar_TN
ar_TN.iso88596
ar_TN.utf8
ar_YE
ar_YE.iso88596
ar_YE.utf8
az_AZ.utf8
be_BY
be_BY.cp1251
be_BY.utf8
bg_BG
bg_BG.cp1251
bg_BG.utf8
bn_BD
bn_BD.utf8
bn_IN
bn_IN.utf8
bokmal
bokmål
br_FR
br_FR@euro
br_FR.iso88591
br_FR.iso885915@euro
bs_BA
bs_BA.iso88592
byn_ER
byn_ER.utf8
C
ca_ES
ca_ES@euro
ca_ES.iso88591
ca_ES.iso885915@euro
ca_ES.utf8
catalan
croatian
cs_CZ
cs_CZ.iso88592
cs_CZ.utf8
cy_GB
cy_GB.iso885914
cy_GB.utf8
czech
da_DK
da_DK.iso88591
da_DK.iso885915
da_DK.utf8
danish
dansk
de_AT
de_AT@euro
de_AT.iso88591
de_AT.iso885915@euro
de_AT.utf8
de_BE
de_BE@euro
de_BE.iso88591
de_BE.iso885915@euro
de_BE.utf8
de_CH
de_CH.iso88591
de_CH.utf8
de_DE
de_DE@euro
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
de_LU
de_LU@euro
de_LU.iso88591
de_LU.iso885915@euro
de_LU.utf8
deutsch
dutch
eesti
el_GR
el_GR.iso88597
el_GR.utf8
en_AU
en_AU.iso88591
en_AU.utf8
en_BW
en_BW.iso88591
en_BW.utf8
en_CA
en_CA.iso88591
en_CA.utf8
en_DK
en_DK.iso88591
en_DK.utf8
en_GB
en_GB.iso88591
en_GB.iso885915
en_GB.utf8
en_HK
en_HK.iso88591
en_HK.utf8
en_IE
en_IE@euro
en_IE.iso88591
en_IE.iso885915@euro
en_IE.utf8
en_IN
en_IN.utf8
en_NZ
en_NZ.iso88591
en_NZ.utf8
en_PH
en_PH.iso88591
en_PH.utf8
en_SG
en_SG.iso88591
en_SG.utf8
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
en_ZA
en_ZA.iso88591
en_ZA.utf8
en_ZW
en_ZW.iso88591
en_ZW.utf8
es_AR
es_AR.iso88591
es_AR.utf8
es_BO
es_BO.iso88591
es_BO.utf8
es_CL
es_CL.iso88591
es_CL.utf8
es_CO
es_CO.iso88591
es_CO.utf8
es_CR
es_CR.iso88591
es_CR.utf8
es_DO
es_DO.iso88591
es_DO.utf8
es_EC
es_EC.iso88591
es_EC.utf8
es_ES
es_ES@euro
es_ES.iso88591
es_ES.iso885915@euro
es_ES.utf8
es_GT
es_GT.iso88591
es_GT.utf8
es_HN
es_HN.iso88591
es_HN.utf8
es_MX
es_MX.iso88591
es_MX.utf8
es_NI
es_NI.iso88591
es_NI.utf8
es_PA
es_PA.iso88591
es_PA.utf8
es_PE
es_PE.iso88591
es_PE.utf8
es_PR
es_PR.iso88591
es_PR.utf8
es_PY
es_PY.iso88591
es_PY.utf8
es_SV
es_SV.iso88591
es_SV.utf8
estonian
es_US
es_US.iso88591
es_US.utf8
es_UY
es_UY.iso88591
es_UY.utf8
es_VE
es_VE.iso88591
es_VE.utf8
et_EE
et_EE.iso88591
et_EE.iso885915
et_EE.utf8
eu_ES
eu_ES@euro
eu_ES.iso88591
eu_ES.iso885915@euro
eu_ES.utf8
fa_IR
fa_IR.utf8
fi_FI
fi_FI@euro
fi_FI.iso88591
fi_FI.iso885915@euro
fi_FI.utf8
finnish
fo_FO
fo_FO.iso88591
fo_FO.utf8
français
fr_BE
fr_BE@euro
fr_BE.iso88591
fr_BE.iso885915@euro
fr_BE.utf8
fr_CA
fr_CA.iso88591
fr_CA.utf8
fr_CH
fr_CH.iso88591
fr_CH.utf8
french
fr_FR
fr_FR@euro
fr_FR.iso88591
fr_FR.iso885915@euro
fr_FR.utf8
fr_LU
fr_LU@euro
fr_LU.iso88591
fr_LU.iso885915@euro
fr_LU.utf8
ga_IE
ga_IE@euro
ga_IE.iso88591
ga_IE.iso885915@euro
ga_IE.utf8
galego
galician
gd_GB
gd_GB.iso885915
german
gez_ER
gez_ER@abegede
gez_ER.utf8
gez_ER.utf8@abegede
gez_ET
gez_ET@abegede
gez_ET.utf8
gez_ET.utf8@abegede
gl_ES
gl_ES@euro
gl_ES.iso88591
gl_ES.iso885915@euro
gl_ES.utf8
greek
gu_IN
gu_IN.utf8
gv_GB
gv_GB.iso88591
gv_GB.utf8
hebrew
he_IL
he_IL.iso88598
he_IL.utf8
hi_IN
hi_IN.utf8
hr_HR
hr_HR.iso88592
hr_HR.utf8
hrvatski
hu_HU
hu_HU.iso88592
hu_HU.utf8
hungarian
icelandic
id_ID
id_ID.iso88591
id_ID.utf8
is_IS
is_IS.iso88591
is_IS.utf8
italian
it_CH
it_CH.iso88591
it_CH.utf8
it_IT
it_IT@euro
it_IT.iso88591
it_IT.iso885915@euro
it_IT.utf8
iw_IL
iw_IL.iso88598
iw_IL.utf8
ja_JP
ja_JP.eucjp
ja_JP.ujis
ja_JP.utf8
japanese
japanese.euc
ka_GE
ka_GE.georgianps
kk_KZ
kk_KZ.pt154
kl_GL
kl_GL.iso88591
kl_GL.utf8
kn_IN
kn_IN.utf8
ko_KR
ko_KR.euckr
ko_KR.utf8
korean
korean.euc
kw_GB
kw_GB.iso88591
kw_GB.utf8
lg_UG
lg_UG.iso885910
lithuanian
lo_LA
lo_LA.utf8
lt_LT
lt_LT.iso885913
lt_LT.utf8
lv_LV
lv_LV.iso885913
lv_LV.utf8
mi_NZ
mi_NZ.iso885913
mk_MK
mk_MK.iso88595
mk_MK.utf8
ml_IN
ml_IN.utf8
mn_MN
mn_MN.utf8
mr_IN
mr_IN.utf8
ms_MY
ms_MY.iso88591
ms_MY.utf8
mt_MT
mt_MT.iso88593
mt_MT.utf8
nb_NO
nb_NO.iso88591
nb_NO.utf8
ne_NP
ne_NP.utf8
nl_BE
nl_BE@euro
nl_BE.iso88591
nl_BE.iso885915@euro
nl_BE.utf8
nl_NL
nl_NL@euro
nl_NL.iso88591
nl_NL.iso885915@euro
nl_NL.utf8
nn_NO
nn_NO.iso88591
nn_NO.utf8
no_NO
no_NO.iso88591
no_NO.utf8
norwegian
nynorsk
oc_FR
oc_FR.iso88591
om_ET
om_ET.utf8
om_KE
om_KE.iso88591
pa_IN
pa_IN.utf8
pl_PL
pl_PL.iso88592
pl_PL.utf8
polish
portuguese
POSIX
pt_BR
pt_BR.iso88591
pt_BR.utf8
pt_PT
pt_PT@euro
pt_PT.iso88591
pt_PT.iso885915@euro
pt_PT.utf8
romanian
ro_RO
ro_RO.iso88592
ro_RO.utf8
ru_RU
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
russian
ru_UA
ru_UA.koi8u
ru_UA.utf8
se_NO
se_NO.utf8
sid_ET
sid_ET.utf8
sk_SK
sk_SK.iso88592
sk_SK.utf8
slovak
slovene
slovenian
sl_SI
sl_SI.iso88592
sl_SI.utf8
so_DJ
so_DJ.iso88591
so_ET
so_ET.utf8
so_KE
so_KE.iso88591
so_SO
so_SO.iso88591
spanish
sq_AL
sq_AL.iso88591
sq_AL.utf8
sr_YU
sr_YU@cyrillic
sr_YU.iso88592
sr_YU.iso88595@cyrillic
sr_YU.utf8
sr_YU.utf8@cyrillic
st_ZA
st_ZA.iso88591
st_ZA.utf8
sv_FI
sv_FI@euro
sv_FI.iso88591
sv_FI.iso885915@euro
sv_FI.utf8
sv_SE
sv_SE.iso88591
sv_SE.iso885915
sv_SE.utf8
swedish
ta_IN
ta_IN.utf8
te_IN
te_IN.utf8
tg_TJ
tg_TJ.koi8t
thai
th_TH
th_TH.tis620
th_TH.utf8
ti_ER
ti_ER.utf8
ti_ET
ti_ET.utf8
tig_ER
tig_ER.utf8
tl_PH
tl_PH.iso88591
tr_TR
tr_TR.iso88599
tr_TR.utf8
tt_RU.utf8
turkish
uk_UA
uk_UA.koi8u
uk_UA.utf8
ur_PK
ur_PK.utf8
uz_UZ
uz_UZ@cyrillic
uz_UZ.iso88591
uz_UZ.utf8@cyrillic
vi_VN
vi_VN.tcvn
vi_VN.utf8
wa_BE
wa_BE@euro
wa_BE.iso88591
wa_BE.iso885915@euro
wa_BE.utf8
xh_ZA
xh_ZA.iso88591
xh_ZA.utf8
yi_US
yi_US.cp1255
zh_CN
zh_CN.gb18030
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8
zh_HK
zh_HK.big5hkscs
zh_HK.utf8
zh_SG
zh_SG.gb2312
zh_SG.gbk
zh_TW
zh_TW.big5
zh_TW.euctw
zh_TW.utf8
zu_ZA
zu_ZA.iso88591
zu_ZA.utf8
Re: Another lang-file running onto english OS
May 18, 2005 05:58AM
try this simple script from the strftime-manual-page (http://de.php.net/manual/en/function.strftime.php) to see if your locales are correctly working:
<?php
setlocale(LC_TIME, "C");
echo strftime("%A");
setlocale(LC_TIME, "fi_FI");
echo strftime(" in Finnish is %A,");
setlocale(LC_TIME, "fr_FR");
echo strftime(" in French %A and");
setlocale(LC_TIME, "de_DE");
echo strftime(" in German %A.\n");
?>

phorum only uses the strftime-function and the locale-setting from the language-file for that.

your "suggestion" would mean a complete rewrite of the date-generation, not only some additional language-vars. We have no plans to do this as the current date-generation works fine overall.
You can hack your include/format_functions.php if you want it to work different.


Thomas Seifert
Re: Another lang-file running onto english OS
May 18, 2005 08:12AM
You can also modify the script Thomas posted to show only languages you need and then try every locale that could be right to see what works.

for example try all these:

portuguese
pt_BR
pt_BR.iso88591
pt_PT
pt_PT@euro
pt_PT.iso88591
pt_PT.iso885915@euro


---
-=[ Panu ]=-
Re: Another lang-file running onto english OS
May 19, 2005 03:21AM
In the meanwhile, I tested it onto another 2 different servers with 2 different OS. It is there the same problem.

(1)

FreeBSD 4.10-SATA-RELEASE #0: T i386
Server: Apache/1.3.31 (Unix)

<?php
> setlocale(LC_TIME, "C");
> echo strftime("%A");
> setlocale(LC_TIME, "fi_FI");
> echo strftime(" in Finnish is %A,");
> setlocale(LC_TIME, "fr_FR");
> echo strftime(" in French %A and");
> setlocale(LC_TIME, "de_DE");
> echo strftime(" in German %A.\n");
> ?>

makes:

Wednesday in Finnish is Wednesday, in French Wednesday and in German Wednesday.


(2)

Linux 2.6.5-1.358 #1 Sat May 8 09:04:50 EDT 2004 i686
Apache/2.0.51 (Fedora)

<?php
> setlocale(LC_TIME, "C");
> echo strftime("%A");
> setlocale(LC_TIME, "fi_FI");
> echo strftime(" in Finnish is %A,");
> setlocale(LC_TIME, "fr_FR");
> echo strftime(" in French %A and");
> setlocale(LC_TIME, "de_DE");
> echo strftime(" in German %A.\n");
> ?>

makes:

Wednesday in Finnish is keskiviikko, in French mercredi and in German Mittwoch.


> phorum only uses the strftime-function and the
> locale-setting from the language-file for that.

ok

> your "suggestion" would mean a complete rewrite of
> the date-generation, not only some additional
> language-vars.

phorum5 should be independent from _any_ OS. As far as I know, Win3000-IIS does not have strftime-function and then you have again a problem and you need a big plugin-installation (just only for phorum5 which makes the win-server again more slowlier).

We also do not have to ignore, that most users do not have root-access and this is why we cannot ignore this lang-bug of phorum5, I think so. The final goal is, that if a user select his language, he is then going to get the correct one name in the right one language for 100% sure.

This is just now not the case in 5.0.16. I don't know, if this will in 5.1 or 5.2.


I am still confused about this result:

Wednesday in Finnish is Wednesday, in French Wednesday and in German Wednesday.

Wednesday in Finnish is keskiviikko, in French mercredi and in German Mittwoch.

Both servers have the same locale lang installed. It is wonderful, that RedHat likes phorum5 and FreeBSD ignore the language-wish of a phorum-user. :-(
Re: Another lang-file running onto english OS
May 19, 2005 03:38AM
Panu Wrote:
-------------------------------------------------------
> You can also modify the script Thomas posted to
> show only languages you need and then try every
> locale that could be right to see what works.
>
> for example try all these:
>
> portuguese
> pt_BR
> pt_BR.iso88591
> pt_PT
> pt_PT@euro
> pt_PT.iso88591
> pt_PT.iso885915@euro

All these were tested:

Ir para: Lista de Fóruns•Lista de Mensagens•Novo Tópico•Pesquisar•Conectar
test
Postado por: jaja (IP Conectado)
Data: 11. May 2005 23:13

May != Maio

The months cannot be translated, because the month-translations don't exist in the lang-files.
Re: Another lang-file running onto english OS
May 19, 2005 04:59AM
irob Wrote:
-------------------------------------------------------
> The months cannot be translated, because the
> month-translations don't exist in the lang-files.

Well how come I get "toukokuu" on my linux installation?
Päiväys: 18. toukokuuta 2005 23.56

I haven't touched any lang-files, all month etc names are on the locale file and PHP gets them from there just fine.

So you may have to experiment what is the working localename. And are you sure other programs that use locales are working? Maybe the locales are not correctlöy installed on the BSD box?

I can't give you help on that because BSD is as unknown to me as is amigaos boot sequence...


---
-=[ Panu ]=-
Re: Another lang-file running onto english OS
May 19, 2005 05:07AM
irob Wrote:
-------------------------------------------------------

> phorum5 should be independent from _any_ OS. As
> far as I know, Win3000-IIS does not have
> strftime-function and then you have again a
> problem

Wow, that would be a large problem for A LOT of php-applications using a *standard* strftime-function.
So if win3000 (????) IIS drops a standard function you can drop php there alltogether.

> and you need a big plugin-installation
> (just only for phorum5 which makes the win-server
> again more slowlier).

We are not the only ones using that function.

>
> We also do not have to ignore, that most users do
> not have root-access

They don't need to. Its the responsibility of the host to have a correct locale-install on the machine.

>
> This is just now not the case in 5.0.16. I don't
> know, if this will in 5.1 or 5.2.

No plans to change anything on that.
If you want to be sure just change the date-string to not contain any text, just numbers (like it was in phorum3).


> Both servers have the same locale lang installed.
> It is wonderful, that RedHat likes phorum5 and
> FreeBSD ignore the language-wish of a phorum-user.

Don't talk about "phorum-user"s only.
We are using a standard php-function, nothing more, nothing less.
That means just that either the locales are not correctly installed or the php-installation is not working.
You should ask in the php-groups or bugtracker why locales are not working on some machines.
We have nothing to do with that part.





Thomas Seifert
Re: Another lang-file running onto english OS
May 19, 2005 06:27PM
> You should ask in the php-groups or bugtracker why
> locales are not working on some machines.
> We have nothing to do with that part.

Same argument by the support-engineers of FreeBSD. They say, that I should contact the programmers of phorum5. And you say, I should contact FreeBSD. I really like such clown-games to make me to a fullidiot, really. I love such teamworks between phorum5 and FreeBSD while to let the phorum-admin die as a stupid dog. Fact is, the bug of phorum5 running onto FreeBSD is _not_ solved.

This language-bug of phorum5 have maden me busy for over 3 full days. It's very helpful by you to give such ts77-comfortable answers, because it might make a little work to update phorum5 to get the problem of independence solved. But at the same time, you already got a suggestion-solution on silver-tablett by me. You need only to realize it.

RedHat has
[phorum.org]

FreeBSD has
[phorum.org]

Both are correctly installed. locales are fine and php is also fine. All the other softwares produce correct month-names and day-names. Only phorum5 does not do it and I do not the reason for it.

But tell me - after I posted you all the naked datas - why the heck do you want then to get all the server-datas? You already knew it, that you will continue to ignore the lang-bug of phorum5.
Re: Another lang-file running onto english OS
June 23, 2005 06:48AM
Hello,

intersting discusion.
I have the same problem with the dutch translation and I cannot get it right. My providers tells me to change phorum so ....
It looks as if there is something not right in Phorum with the names of months.
Any suggestions to get them to show in dutch?

Franc


Things are not always what they seem to be.
Sorry, only registered users may post in this forum.

Click here to login