Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 08:02 am EST
Geeklog Forums
Locale problem, server to blaim?
InDio
Anonymous
Hi guys, good thing you don't have to be registerd to post here.
Installed geeklog just fine. I want use the hellenic (greek) language. Do everything right in config.php, but all letters are the usual "elfish"..
config.php:
$_CONF['language'] = 'hellenic';
$_CONF['locale'] = 'el_GR';
$_CONF['date'] = '%A, %B %d %Y @ %I:%M %p %Z';
$_CONF['daytime'] = '%m/%d %I:%M%p';
$_CONF['shortdate'] = '%x';
$_CONF['dateonly'] = '%d-%b';
$_CONF['timeonly'] = '%I:%M %p %Z';
$_CONF['default_charset'] = 'ISO-8859-7';
I'm on a RH9.0 linux server. I can write greek letters on the bash shell, but the thing is that, when I run this script:
/test.php
<?php
echo "<p>Today is " . strftime ("%A");
$result = setlocale (LC_ALL, 'el_GR');
if ($result === false) {
echo "<p>An error occured when switching the locale.";
} else {
echo "<p>Switched to locale " . $result;
echo "<p>Today is ασδ" . strftime ("%A");
}
?>
, the printed (greek) day is again elfish.... What should I do?
Thank you....waiting on you to finish our wifi community portal!
Installed geeklog just fine. I want use the hellenic (greek) language. Do everything right in config.php, but all letters are the usual "elfish"..
config.php:
Text Formatted Code
$_CONF['language'] = 'hellenic';
$_CONF['locale'] = 'el_GR';
$_CONF['date'] = '%A, %B %d %Y @ %I:%M %p %Z';
$_CONF['daytime'] = '%m/%d %I:%M%p';
$_CONF['shortdate'] = '%x';
$_CONF['dateonly'] = '%d-%b';
$_CONF['timeonly'] = '%I:%M %p %Z';
$_CONF['default_charset'] = 'ISO-8859-7';
I'm on a RH9.0 linux server. I can write greek letters on the bash shell, but the thing is that, when I run this script:
Text Formatted Code
/test.php
<?php
echo "<p>Today is " . strftime ("%A");
$result = setlocale (LC_ALL, 'el_GR');
if ($result === false) {
echo "<p>An error occured when switching the locale.";
} else {
echo "<p>Switched to locale " . $result;
echo "<p>Today is ασδ" . strftime ("%A");
}
?>
, the printed (greek) day is again elfish.... What should I do?
Thank you....waiting on you to finish our wifi community portal!
16
11
Quote
tokyoahead
Anonymous
The point is not so much the locale, much more the Encoding (ISO-....).
Check that its the same in config.php as in the language file.
If all else fails, set all to UTF-8, that is surely the strongest measure to get your encoding to work. Use the UTF-8 language file etc.
Check that its the same in config.php as in the language file.
If all else fails, set all to UTF-8, that is surely the strongest measure to get your encoding to work. Use the UTF-8 language file etc.
17
12
Quote
InDio
Anonymous
No good. Keep getting rubbish.
I changed the charset to UTF-8 in both the config and the language file, and nothing. I also used different cmbinations to the config variale 'locale'=el_GR,el_gr,gr, but nothing worked. The charset of the HTML prodused by the PHP scripts is ISO-8859-7(greek), but the letters wont become greek until I choose the greek charseet from the browser.
Advise welcome...I'm preparing a news portal for our community wireless network here in Greece..
I changed the charset to UTF-8 in both the config and the language file, and nothing. I also used different cmbinations to the config variale 'locale'=el_GR,el_gr,gr, but nothing worked. The charset of the HTML prodused by the PHP scripts is ISO-8859-7(greek), but the letters wont become greek until I choose the greek charseet from the browser.
Advise welcome...I'm preparing a news portal for our community wireless network here in Greece..
15
14
Quote
InDio
Anonymous
Now language support is completely broken..... . Guess I messed things up trying to make it work. I deleted everything, installed geeklog from scratch, but language is again not working.
Now only the locale setting works, which pops up dates in the wrong charset. Whatever language I choose, geeklog stays in english.
$_CONF['language'] = 'hellenic'; or $_CONF['language'] = 'english'; makes no difference to geeklog.
for an anwser
Now only the locale setting works, which pops up dates in the wrong charset. Whatever language I choose, geeklog stays in english.
$_CONF['language'] = 'hellenic'; or $_CONF['language'] = 'english'; makes no difference to geeklog.
for an anwser
17
19
Quote
InDio
Anonymous
Last post was made in a moment of panic, my apologies. Still the same problem, language=hellenic, html charset is (greek), but page rendering is wrong....
16
17
Quote
tokyoahead
Anonymous
The problem is that you have to choose chat you want: Your menus to work first or to be able to read the text of a story you already entered.
I suggest you check first to make your language file and therefore the menu working
switch the geeklog language to hellenic. then switch your browsers encoding until you can read it. Then, take that encoding type and set it in your language file and in config.php.
then, switch the browser back to automatic encoding and see if it works. If yes, write a story and save it, check if it works.
if all else fails give us the URL and I can check which encoding is good. you can also get the UTF-8 hellenic language file from the pack that I uploaded from the download section and simply set all to UTF-8
I suggest you check first to make your language file and therefore the menu working
switch the geeklog language to hellenic. then switch your browsers encoding until you can read it. Then, take that encoding type and set it in your language file and in config.php.
then, switch the browser back to automatic encoding and see if it works. If yes, write a story and save it, check if it works.
if all else fails give us the URL and I can check which encoding is good. you can also get the UTF-8 hellenic language file from the pack that I uploaded from the download section and simply set all to UTF-8
17
13
Quote
InDio
Anonymous
Thanks for your reply, tokyoahead. My config has hellenic and default charser=ISO-8859-7. The language file hellenic.php is also in ISO-8859-7, this is the correct ISO charset for greek (hellenic). The HTML that is produced by geeklog scripts is
, so it is supposedly right. Rubbish letters. If I switch mozilla to iso-8859-7, the letters in both the menus and the posted news, are OK.
In brief, charset is correct, but its not "sensed" by the browser.
What's left to do?
, so it is supposedly right. Rubbish letters. If I switch mozilla to iso-8859-7, the letters in both the menus and the posted news, are OK.
In brief, charset is correct, but its not "sensed" by the browser.
What's left to do?
10
16
Quote
tokyoahead
Anonymous
ok, I had the same problem.
there are two ways, one professional and one workaround
the professional:
set the default encoding in your php.ini to that encoding
the workaround:
add the follwing line to the header.thtml of your layouts:
[?php header("content-type: text/html; charset={charset}")?]
replace the [] with the pointy, html-type ones, I cannot type them here.
there are two ways, one professional and one workaround
the professional:
set the default encoding in your php.ini to that encoding
the workaround:
add the follwing line to the header.thtml of your layouts:
[?php header("content-type: text/html; charset={charset}")?]
replace the [] with the pointy, html-type ones, I cannot type them here.
14
17
Quote
InDio
Anonymous
You solved the case tokyoahed!
Thank you, geeklog's up and runnig.
Thank you, geeklog's up and runnig.
16
18
Quote
Status: offline
Martinez
Forum User
Newbie
Registered: 10/19/04
Posts: 7
Location:Poland - Zakopane
Hi.
This is not the geeklog problem. You probably may have the same problem with other international systems.
Problem is in yours Apache's config file, where is no 'DefaultCharset' directive. If You have an standard instalation of this server, you also have (or maybe I'm wrong?) standard config file, wherein is no such directive (it's commented out), or it's set on ISO-8859-1.
Check Yours config
Best regards!
This is not the geeklog problem. You probably may have the same problem with other international systems.
Problem is in yours Apache's config file, where is no 'DefaultCharset' directive. If You have an standard instalation of this server, you also have (or maybe I'm wrong?) standard config file, wherein is no such directive (it's commented out), or it's set on ISO-8859-1.
Check Yours config
Best regards!
15
14
Quote
tokyoahead
Anonymous
You are right. When I wrote my last post, I made the mistake of referencing to the PHP.ini for the default config. Actually it is, as you said, in the hddp.conf.
However, you still have the same problem once you want to display several different charsets in geeklog depending n the selected charset in the langauge. This can still be corrected with the header info. Also, not everyone can edit the apache config due to provider limitations.
However, you still have the same problem once you want to display several different charsets in geeklog depending n the selected charset in the langauge. This can still be corrected with the header info. Also, not everyone can edit the apache config due to provider limitations.
16
15
Quote
Well, I encountered a similar problem and I used to think that apache config files have the last say. I'm afraid they don't. (see post ).
Quite clearly there is some place in the code that sends out http header() charset information (Firefox takes that on account as opposed to MSIE) which corresponds to user language preference, or if thet is not set - then defaults to the one set in config.php. Apache settings may be changed as much as you like - these 2 seem to override.
Quite clearly there is some place in the code that sends out http header() charset information (Firefox takes that on account as opposed to MSIE) which corresponds to user language preference, or if thet is not set - then defaults to the one set in config.php. Apache settings may be changed as much as you like - these 2 seem to override.
21
19
Quote
All times are EST. The time is now 08:02 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content