0
Welcome Guest! Login
0 items Join Now

ROCKETTHEME IS CLOSING ON JUNE 30, 2025. As a thank-you to our community, enjoy 50% off all themes with the promo code THANKYOU before we shut down. Read our Farewell Blog Post for more details.

Display date in spanish

  • Display date in spanish

    Posted 14 years 2 months ago
    • Hello, I tried for more then 48 hours to solved a display problem for my date. I am using the TerranTribune template. I added a setLocale to display my date in spanish but no success.

      I then went to the folder js and manually changed the rokutils.js and replace the days and months for spanish. That worked. But what happens if I want to install a new language ? My dates will be in spanish. There is no way to display the correct date for the correct language by code ?

      Thanks for the help !

      //make the language ES
      setlocale (LC_TIME, "es_ES");
      // echo strftime ('%A %d %B %Y');
      $now = &JFactory::getDate();

      //$now = strftime ('%A %d %B %Y');
      echo $now->toFormat('%A'); ?>
      <span class="date-number"><?php echo $now->toFormat('%d'); ?></span>
      <?php echo $now->toFormat('%B'); ?>
      </div>

Time to create page: 0.057 seconds