Firefox PHP

Another lang-file running onto english OS

Posted by irob 
Another lang-file running onto english OS
May 13, 2005 06:44PM
Hmm, if someone use another lang-file running onto an US-Server with english software, then the varible will ignore the correct name of the month in the right one language.

english.php
$PHORUM['long_date']="%B %e, %Y %I:%M%p";
$PHORUM['short_date']="%D %I:%M%p";

= May

german.php
$PHORUM['long_date']="%d. %B %Y %H:%M";
$PHORUM['short_date']="%d.%m.%y %H:%M";

= May (that's wrong, it shoud be "Mai")

brazilian.php

= May (that's wrong, it should be "Maio")

The same happens also with french.php, italian.php and so on. In this moment, if there is an US-Server running english OS,... it produces always the english name of the month.

german.php, italian.php, french.php and so on, they all do not have a variable of the right one month-definitions, seems so.

bye
irob




Edited 1 time(s). Last edit at 05/13/2005 06:55PM by irob.
Re: Another lang-file running onto english OS
May 13, 2005 06:52PM
I would suggest:


ENGLISH (english.php)
=====================
// months of the year
$messages['months'] = Array( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' );
$messages['January'] = $messages['months'][0];
$messages['February'] = $messages['months'][1];
$messages['March'] = $messages['months'][2];
$messages['April'] = $messages['months'][3];
$messages['May'] = $messages['months'][4];
$messages['June'] = $messages['months'][5];
$messages['July'] = $messages['months'][6];
$messages['August'] = $messages['months'][7];
$messages['September'] = $messages['months'][8];
$messages['October'] = $messages['months'][9];
$messages['November'] = $messages['months'][10];
$messages['December'] = $messages['months'][11];


BRAZILIAN-PORTUGESE (brazilian.php)
===================================
// months of the year
$messages['months'] = Array( 'janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro' );
$messages['January'] = $messages['months'][0];
$messages['February'] = $messages['months'][1];
$messages['March'] = $messages['months'][2];
$messages['April'] = $messages['months'][3];
$messages['May'] = $messages['months'][4];
$messages['June'] = $messages['months'][5];
$messages['July'] = $messages['months'][6];
$messages['August'] = $messages['months'][7];
$messages['September'] = $messages['months'][8];
$messages['October'] = $messages['months'][9];
$messages['November'] = $messages['months'][10];
$messages['December'] = $messages['months'][11];


GERMAN (german.php)
===================
// months of the year
$messages['months'] = Array( 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' );
$messages['January'] = $messages['months'][0];
$messages['February'] = $messages['months'][1];
$messages['March'] = $messages['months'][2];
$messages['April'] = $messages['months'][3];
$messages['May'] = $messages['months'][4];
$messages['June'] = $messages['months'][5];
$messages['July'] = $messages['months'][6];
$messages['August'] = $messages['months'][7];
$messages['September'] = $messages['months'][8];
$messages['October'] = $messages['months'][9];
$messages['November'] = $messages['months'][10];
$messages['December'] = $messages['months'][11];

Same also for the other language. Then it will be 100% sure, that by selecting the right one language, it will also output the correct name of a month.

Hmmm....

Note: This is only a suggestion. Do not copy-paste it.



Edited 1 time(s). Last edit at 05/13/2005 06:54PM by irob.
Re: Another lang-file running onto english OS
May 13, 2005 11:25PM
Your servers locale's are not correct.

see for example [www.linux.com]

or search earlier messages here.


---
-=[ Panu ]=-
Re: Another lang-file running onto english OS
May 13, 2005 11:59PM
Hi Panu,

Panu Wrote:
> Your servers locale's are not correct.
> see for example

Indic Fonts? wth indic? <confused>

Well, I am not a specialist about Chinese-BIG5 and Indic Fonts. I am sure, that the chinesebig5.php and india.php will work fine. For me, it counts only, that the month "May" is

in english.php: May
in brazilian.php: Maio
in german.php: Mai

That's only an example. The same is also with the month "June" (Junho, Juni)

And such definitions or variables for making that stabile, do not exist in the language-files.

bye
irob
Re: Another lang-file running onto english OS
May 14, 2005 01:00AM
sorry, I pasted wrong url

this is for gentoo but I think it's quite general. You can search distro specific howtos from google for example.

[www.gentoo.org]

You can have many locales installed in your system at the same time and PHP pick up the corect string from them based on the locale setting. if you don't have the locale installed it uses the default (only?) locale installed which is usually en-US or some other english locale.

---
-=[ Panu ]=-
Re: Another lang-file running onto english OS
May 16, 2005 08:51PM
irob, either you missed to set the locale in your language-files:
// locale setting for localized times/dates
// see that page: [www.w3.org]
// for the needed string
$PHORUM['locale']="EN";

or your server is just hosed.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Another lang-file running onto english OS
May 16, 2005 09:26PM
ts77 Wrote:
-------------------------------------------------------
> irob, either you missed to set the locale in your
> language-files:
> // locale setting for localized times/dates
> // see that page:
> // for the needed string
> $PHORUM['locale']="EN";

it has nothing to do with that. Everything is ok with that.

Either phorum5 does not like me, because I am not able to define "Maio" in brazilian-language. I am also not able to use other month-names. I can write in the $PHORUM['locale']= what I what, the output of phorum5 is always the same and says "May" (=english).

> or your server is just hosed.

I have root-access, yes. All the other softwares workes fine with the correct month-name. Only phorum5 makes problems. I think, phorum5 is hosed.

And in the script before, I already made a suggestion to fix this lang-bug.
Re: Another lang-file running onto english OS
May 16, 2005 09:28PM
there is no "lang-bug".
the locale-setting is there to just allow localized month-names and it works if the server is correctly configured.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Another lang-file running onto english OS
May 16, 2005 11:19PM
- the server is correctly configured.
- all licences are paid.

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



Edited 1 time(s). Last edit at 05/16/2005 11:20PM by irob.
Re: Another lang-file running onto english OS
May 16, 2005 11:48PM
so, what do you think about my suggestion for the lang-update which I posted at [phorum.org]

Sorry, only registered users may post in this forum.

Click here to login