News date format

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
root213
New Member
New Member
Posts: 3
Joined: Fri Jan 27, 2012 4:07 pm

News date format

Post by root213 »

Hello, I have a question about date format in the news module.
Hope I've chosen the right section as the news module is not a third party module.

I used search, found some relative discussions, but no solution for my situation.

System info:
cmsms 1.10.3
News 2.12.3
php 5.2.17
mysql 5.1.54

The question:
I want the dates to be shown on russian or simply like that:
27.01.2012

For now dates in news are shown in english..
Here is the pic for those who don't understand what I mean:
Image (Jan)

My language is russian, I set it everywhere I can:
- during installation
- site admin\global settings
- my preferences\user preferences

Here are time zone and encoding settings from config.php file
$config['timezone'] = 'Europe/Moscow';
$config['default_encoding'] = 'utf-8';
$config['locale'] = 'utf-8';
User avatar
frankmanl
Power Poster
Power Poster
Posts: 425
Joined: Sat Jul 12, 2008 3:50 am

Re: News date format

Post by frankmanl »

Hi Root 213,
Have a look at Site Admin > Global Settings > General Settings > Date Format String. Here you fill in your default date format.
Google for strftime and you'll find all possibilities.
In your case you would have to enter %d.%m.%Y.

Frank
uniqu3

Re: News date format

Post by uniqu3 »

use $config['locale'] = 'ru_RU.utf-8'; in your config.php
root213
New Member
New Member
Posts: 3
Joined: Fri Jan 27, 2012 4:07 pm

Re: News date format

Post by root213 »

Hello frankmanl, thanks this makes things much better!

Hello uniqu3, tried this but site still shows english months.

Anyway this time I can live with %d.%m.%Y.

Thank you.
uniqu3

Re: News date format

Post by uniqu3 »

You could override it with a UDT.

Name it set_locale and use it on top of your Tempalte with {set_locale}

Code: Select all

setlocale(LC_ALL, array('ru_RU.UTF-8','ru_RU@euro','ru_RU','russian'));
To find out what locale is supported on your Server see this post: http://www.i-do-this.com/blog/59/Find-l ... your-Setup
root213
New Member
New Member
Posts: 3
Joined: Fri Jan 27, 2012 4:07 pm

Re: News date format

Post by root213 »

Thanks I'll try this.

Now I have a minor problem with posting news.
Whenever I try to add anything to URL: field, it shows the error
Invalid URL (maybe it is already used, or there are invalid characters) (Troubleshooting)
Even tried simply http://google.com - no result.
Locked

Return to “[locked] Installation, Setup and Upgrade”