The Ultimate Weblog System

Welcome to Geeklog
Tuesday, February 09 2010 @ 06:36 PM EST


 Forum Index > Support > General Help New Topic Post Reply
 Change language on date
 |  Printable Version
Cohin
 January 17 2004 12:35 PM (Read 1533 times)  
Forum Newbie
Newbie

Status: offline

Registered: 12/31/03
Posts: 14

Hello, I would like to ask you how to change the language on the date, now in English, in my Spanish page. I would like all dates, the top wellcome date, and the article dates to show in Spanish and I do not know how to change that. Thank you


 
Profile Email PM
Quote
Dirk
 January 17 2004 12:51 PM  
Forum Admin
Admin

Status: offline

Registered: 01/12/02
Posts: 12492

You have to set the correct locale in config.php. For Spanish, try

$_CONF['locale'] = 'es_ES';

(assuming your site is running on a Unix-like system)

bye, Dirk


 
Profile Email Website PM
Quote
Cohin
 January 17 2004 13:00 PM  
Forum Newbie
Newbie

Status: offline

Registered: 12/31/03
Posts: 14

I actually had

$_CONF['language'] = 'spanish';
$_CONF['locale'] = 'es-ES';
and still shows in English rather than Spanish


 
Profile Email PM
Quote
Dirk
 January 17 2004 13:22 PM  
Forum Admin
Admin

Status: offline

Registered: 01/12/02
Posts: 12492

Try 'es_ES' (with an underscore).

It's also possible that your hosting service does not support Spanish (especially if it's cheap / free hosting or located in another country).

Btw, I just wrote an FAQ entry explaining the language and locale settings.

bye, Dirk


 
Profile Email Website PM
Quote
Cohin
 January 17 2004 14:27 PM  
Forum Newbie
Newbie

Status: offline

Registered: 12/31/03
Posts: 14

Looked at lots angles on this, my Unix server does allow Spanish and everything seams to be in order, yet my date is in English. I looked around the web at other Geeklog sites in Spanish, and everyone I saw has the dates in Englist. I will continue looking for a solution, once I find it I let you know.


 
Profile Email PM
Quote
Dirk
 January 17 2004 14:46 PM  
Forum Admin
Admin

Status: offline

Registered: 01/12/02
Posts: 12492

Try this little script:

PHP Formatted Code
<?php

echo "<p>Today is " . strftime ("%A");

$result = setlocale (LC_ALL, 'es_ES');

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");
}

?>
 
If it produces an error message, try replacing "LC_ALL" with "LC_TIME" and see if that makes a difference.

bye, Dirk


 
Profile Email Website PM
Quote
Cohin
 January 17 2004 15:24 PM  
Forum Newbie
Newbie

Status: offline

Registered: 12/31/03
Posts: 14

It gives me

Today is Saturday

Switched to locale es_ES

Today is sábado

no error message.
My config.php is
$_CONF['language'] = 'spanish';
$_CONF['locale'] = 'es-ES';
$_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'] = 'es-ES.iso-8859-1';
$_CONF['rdf_language'] = 'es-ES'; // may have to be different than the locale

What am I doing wrong Dirk?


 
Profile Email PM
Quote
Dirk
 January 17 2004 15:50 PM  
Forum Admin
Admin

Status: offline

Registered: 01/12/02
Posts: 12492

Quote by Cohin: $_CONF['locale'] = 'es-ES';


As I said above, try 'es_ES' with an underscore - you have a dash (minus) there ...

bye, Dirk


 
Profile Email Website PM
Quote
Cohin
 January 17 2004 15:57 PM  
Forum Newbie
Newbie

Status: offline

Registered: 12/31/03
Posts: 14

solved! Tnank you for your patince.


 
Profile Email PM
Quote
Content generated in: 5.16 seconds
New Topic Post Reply



 All times are EST. The time is now 06:36 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content