index.act.php 538 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * Action script for example date plugin
  4. * @package chamilo.plugin.date
  5. */
  6. /**
  7. * Initialization
  8. */
  9. $convert_lang_to_code = array(
  10. "english" => "en_US",
  11. "french" => "fr_BE",
  12. "dutch" => "nl_NL",
  13. "german" => "de_DE",
  14. "japanese" => "ja_JP",
  15. "danish" => "da_DK",
  16. );
  17. if (!empty($_SESSION['user_language_choice']) && !empty($convert_lang_to_code[$_SESSION['user_language_choice']])) {
  18. $code = $convert_lang_to_code[$_SESSION['user_language_choice']];
  19. $locale = setlocale(LC_TIME, $code);
  20. }
  21. $date = strftime('%c');