Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Problem with date

Asked Modified Viewed 1,954 times
D
Dragonlord
D
  • Junior Member, joined since
  • Contributed 19 posts on the community forums.
  • Started 4 threads in the forums
  • Started this discussions
asked
Junior Member

Hi all. Ive been working with PF locally, and this last few days I notice that theres a problem with date. If I run the site with X theme, and with the English locale everything works ok. But if I change the locale to Spanish locale the date will appear in English, and when I change the theme the date gets displayed as:
Märts 10 2006 12:45:02

The date in Spanish should be Marzo 10 2006 12:45:02 I noticed that it gets displayed like that in every theme except for the default theme that Im using. For the default one the date its always in Englsih. Any suggestions on how to fix this would be appreciated.
0 replies

2 posts

M
mihe
M
mihe 10
  • Newbie, joined since
  • Contributed 1 post on the community forums.
answered
Newbie

Look at this, i had had the same problem, and has been easy to fix :-)

Mira esto, yo he tenido el mismo problema, y me ha sido facil solucionarlo :-)

// Locale Settings
//setlocale(LC_TIME, "es","ES"); // Linux Server (Windows may differ)
setlocale (LC_TIME,"spanish"); //añadido por mihe, para que muestre los meses en español


is the global.php filo of spanish translate.

es el fichero global.php de la carpeta de traduccion al espaƱol

Regards / Saludos
0 replies
D
Dragonlord
D
  • Junior Member, joined since
  • Contributed 19 posts on the community forums.
  • Started 4 threads in the forums
  • Started this discussions
answered
Junior Member

Thx mihe. I modified the global.php file from the Spanish locale and everything is working fine.
Gracias mihe, hice los cambios en el archivo global.php del locale Spanish y ahora todo funciona bien.

For the users of the Satellite Theme. Changing the global.php file with the code provided by mihe wont fix the problem. Thats because the Satellite theme uses a Java Script for the time. So in order to get the Satellite theme to display the date correctly in Spanish you need to modify 2 files.

File 1
locale/Spanish/global.php
Use the code from mihe
// Locale Settings
//setlocale(LC_TIME, "es","ES"); // Linux Server (Windows may differ)
setlocale (LC_TIME,"spanish"); //añadido por mihe, para que muestre los meses en español


File 2
Its required to edit the Themes/Satellite/theme.php
Look for the clock script. Set the entired script as a commentary.

//Set as commentary
/*   // Clock Script
   echo "<div class='date' id='Clock'>";
   echo "<script type='text/javascript'>
      <!--
      var DayNam = new Array(
      'Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
      var MnthNam = new Array(
      'January','February','March','April','May','June','July','August','September','October','November','December');
      //-->
      </script>";
   echo "<script type='text/javascript' src='".THEME."clock.js'></script>";
   echo "</div></td>";
   // Clock Script Ends */


The code bellow its from another theme.php
Making those changes will disable the use of the file clock.js located in Themes/Satellite/
echo "".ucwords(showdate($settings['subheaderdate'], time()))."";


I have tested with this code on my local site and its working fine. I hope this helps the PF users that like using this theme. If anyone need a Spanish translation of all that I typed here, let me know.
0 replies

Category Forum

Bugs and Errors - 6

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 2 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet