Language in dates?
-
I want to translate my them – I think I can see how in edit them I can change most things, but where can I find out how to change things like dates that are automatically placed into my blog?
-
What exactly do you want translated in date?
I will need to change the months. Though thinking about it can I just set to a number date format?
If only months… wp-includes/locale.php
Thanks. Would this look right (I have done the same with the weekdays). Perhaps I’ll have to find some more things as I go! 🙂
// Abbreviations for each day.
$this->weekday_abbrev[__(‘Dimanche’)] = __(‘Dim’);
$this->weekday_abbrev[__(‘Lundi’)] = __(‘Lun’);
$this->weekday_abbrev[__(‘Mardi’)] = __(‘Mar’);
$this->weekday_abbrev[__(‘Megredi’)] = __(‘Mec’);
$this->weekday_abbrev[__(‘Jeudi’)] = __(‘Jeu’);
$this->weekday_abbrev[__(‘Venredi’)] = __(‘ven’);
$this->weekday_abbrev[__(‘Samedi’)] = __(‘Sam’);// The Months
$this->month[’01’] = __(‘Janvier’);
$this->month[’02’] = __(‘Février’);
$this->month[’03’] = __(‘Mars’);
$this->month[’04’] = __(‘Avril’);
$this->month[’05’] = __(‘Mai’);
$this->month[’06’] = __(‘Juin’);
$this->month[’07’] = __(‘Juillet’);
$this->month[’08’] = __(‘Août’);
$this->month[’09’] = __(‘Septembre’);
$this->month[’10’] = __(‘Octobre’);
$this->month[’11’] = __(‘Novembre’);
$this->month[’12’] = __(‘Decembre’);// Abbreviations for each month. Uses the same hack as above to get around the
// ‘May’ duplication.
$this->month_abbrev[__(‘Janvier’)] = __(‘Jan_January_abbreviation’);
$this->month_abbrev[__(‘Février’)] = __(‘Feb_February_abbreviation’);
$this->month_abbrev[__(‘Mars’)] = __(‘Mar_March_abbreviation’);
$this->month_abbrev[__(‘Avril’)] = __(‘Apr_April_abbreviation’);
$this->month_abbrev[__(‘Mai’)] = __(‘May_May_abbreviation’);
$this->month_abbrev[__(‘Juin’)] = __(‘Jun_June_abbreviation’);
$this->month_abbrev[__(‘Juillet’)] = __(‘Jul_July_abbreviation’);
$this->month_abbrev[__(‘Août’)] = __(‘Aug_August_abbreviation’);
$this->month_abbrev[__(‘Septembre’)] = __(‘Sep_September_abbreviation’);
$this->month_abbrev[__(‘Octobre’)] = __(‘Oct_October_abbreviation’);
$this->month_abbrev[__(‘Novembre’)] = __(‘Nov_November_abbreviation’);
$this->month_abbrev[__(‘Decembre’)] = __(‘Dec_December_abbreviation’);foreach ($this->month_abbrev as $month_ => $month_abbrev_) {
$this->month_abbrev[$month_] = preg_replace(‘/_.+_abbreviation$/’, ”, $month_abbrev_);It actually looks like it worked when I’ve tested it but the letters with accents like in Février are showing as little question mark symbols?
You need to put accents in their HTML entities forms. For example :
é is é à is à
etc.
You need to put accents in their HTML entities forms.
Nope.
Just make sure you save the files with utf-8 encoding! Even Notepad has such an option…Great! That worked. Thanks! 🙂
Well it did work on the site but when I went to login as admin I get messages like this and it wont let me use the admin panel. Do I need to do something similar in one of the flies in admin?
Warning: Cannot modify header information – headers already sent by (output started at /public_html/fondationyannfouere/wp-includes/locale.php:1) in /public_html/fondationyannfouere/wp-login.php on line 12
Warning: Cannot modify header information – headers already sent by (output started at /public_html/fondationyannfouere/wp-includes/locale.php:1) in /public_html/fondationyannfouere/wp-login.php on line 24
…locale.php:1)
Empty line or blank space in the very first line of that file, before the starting
<?php
Edit. It is in the Codex FAQ – just need to search!
There is no space or other line in the locale.php before..?
<?php
// Date and Time
I’ve looked all over and cant find it?
- The topic ‘Language in dates?’ is closed to new replies.