Alterar data para portugues
-
Tenho um plugin de calendário e estou tentando alterar a exibição da data para português, já tenho configurado no meu wp em configurações gerais o local e a hora atual, mas o plugin insisti em exibir o mês, dia em inglês.
Esse é codigo da parte de data do plugin, alguém sabe alguma opção que eu possa alterar para exibir a data em portugues?
protected function init() { // Stop the execution if we already executed the init function. if ($this->init) return; else $this->init = true; // Set the current time. if (!$this->current_time) // For non-WP scripts use: $this->current_time = time(); $this->current_time = current_time('timestamp'); // Current time -> current day of the week. $this->current_day_of_the_week = date('l', $this->current_time); // If the selected time is not set, then set it to the same value as the current time. if (!$this->selected_time) $this->selected_time = $this->current_time; // Selected time -> current day of the week. list($this->selected_day_of_the_week, $this->selected_month) = explode( ' ', date('l n', $this->selected_time) ); // Selected time -> month and year. $date = date('F Y', $this->selected_time); list($this->selected_month_name, $this->selected_year) = explode(' ', $date); // Selected time -> first day of the month. $this->selected_first_day = strtotime('1 ' . $date); // Set the calendar start time. if ( date('l', $this->selected_first_day) != self::$days_of_the_week[$this->selected_first_day_of_the_week] ) $this->selected_start_time = strtotime('last ' . self::$days_of_the_week[$this->selected_first_day_of_the_week], $this->selected_first_day); else $this->selected_start_time = $this->selected_first_day; // Selected time -> last day of the week. $i = $this->selected_first_day_of_the_week + 6; $i = $i > 7 ? $i - 7 : $i; // Selected time -> last day of the month. $this->selected_last_day = strtotime( date('t ', $this->selected_first_day) . $date ); // Set the calendar end time. if ( date('l', $this->selected_last_day) != self::$days_of_the_week[$i] ) $this->selected_end_time = strtotime( 'next ' . self::$days_of_the_week[$i], $this->selected_last_day ); else $this->selected_end_time = $this->selected_last_day; $this->selected_end_time = strtotime('tomorrow - 1 second', $this->selected_end_time); }
Visualizando 1 resposta (de um total de 1)
Visualizando 1 resposta (de um total de 1)
- O tópico ‘Alterar data para portugues’ está fechado para novas respostas.