| Cohin |
 |
January 17 2004 12:35 PM (Read 1533 times) |
|
|

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
|
| |
|
|
| Dirk |
 |
January 17 2004 12:51 PM |
|
|

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
|
| |
|
|
| Cohin |
 |
January 17 2004 13:00 PM |
|
|

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
|
| |
|
|
| Dirk |
 |
January 17 2004 13:22 PM |
|
|

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
|
| |
|
|
| Cohin |
 |
January 17 2004 14:27 PM |
|
|

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.
|
| |
|
|
| Dirk |
 |
January 17 2004 14:46 PM |
|
|

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
|
| |
|
|
| Cohin |
 |
January 17 2004 15:24 PM |
|
|

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?
|
| |
|
|
| Dirk |
 |
January 17 2004 15:50 PM |
|
|

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
|
| |
|
|
| Cohin |
 |
January 17 2004 15:57 PM |
|
|

Newbie
Status: offline
Registered: 12/31/03
Posts: 14
|
solved! Tnank you for your patince.
|
| |
|
|