Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.20.00 - All Issues
Author Message
tima26
New Member
New Member



Joined: Jun 24, 2008
Posts: 10

PostPosted: Thu Aug 21, 2008 1:08 am Reply with quote

I've problem with the translation of time in News module. I translate ravennuke into Azerbaijan . And now I don't know how translate the time in news. I have read that in Admin Panel ->Preferences -> Locale Time Format I must write the local time. For example :
Turkey lang : tr_TR
English :en_US
Russian :ru_RU
Deustch :de_DE
Spain : es_ES

But I can'y find AZERBAIJAN . Could you help me Rolling Eyes Rolling Eyes
 
View user's profile Send private message
tima26







PostPosted: Thu Aug 21, 2008 2:15 am Reply with quote

Where Can I find this ? Please write your ideas. Thanx from now
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Aug 21, 2008 5:26 am Reply with quote

This can be tricky. Be sure to read http://us3.php.net/setlocale very carefully:

There is a note from 21-Jan-2008 that may help. Use aze instead of cym.
bryn wrote:

bryn AT lunarvis DOT com
21-Jan-2008 06:04
Posting this in the hope it might be useful to others, as I could find very little info anywhere. If you want to use a Welsh locale and have the suitable language support installed, you pass 'cym' (abbreviated form of Cymraeg) to setlocale:

<?php
setlocale(LC_TIME, 'cym');
$welsh= gmstrftime("%A, %B %Y - %H:%M",time());
echo $welsh;
?>

The above certainly applies to Windows systems, but should also apply to Unix if the required support is installed.

Cheers,

Bryn.


Running this script using aze instead of cym produces Cüm? axsami, Avgust 2008 - 11:19. I don't know if that's correct but hopefully this will point you in the right direction.
Code:


<?php
setlocale(LC_TIME, 'aze');
$azerbaijan = gmstrftime("%A, %B %Y - %H:%M",time());
echo $azerbaijan;
?>
 
View user's profile Send private message
tima26







PostPosted: Thu Aug 21, 2008 6:09 am Reply with quote

Thanx Raven
I tried to change mainfile.php

Code:
function formatTimestamp($time) {

    global $datetime, $locale;

    static $localeSet;     // setlocale() can be expensive to call; only need to call it once
    if (!isset($localeSet)) {
        setlocale(LC_TIME, $locale);
        $localeSet = 1;
    }

    if (!is_numeric($time)) {
        preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})/', $time, $datetime);
        $time = gmmktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]);
    }
    $time -= date('Z');
    $datetime = strftime(_DATESTRING, $time);
    $datetime = ucfirst($datetime);
    return $datetime;
}


I replaced setlocale(LC_TIME, $locale); with setlocale(LC_TIME, 'aze');
And also in admin panel a wrote aze. But there was no changes
 
Raven







PostPosted: Thu Aug 21, 2008 6:32 am Reply with quote

My response was not the exact answer to your issue. I was directing you to a source for discovering the solution. Running that script I gave you produces a result that you need to confirm is correct. If it is then you know your server is set up for Azerbaijan which is a base/core requirement before the RN solution will even work. Then I was leaving it up to you to use Google to discover the ??_?? code for Azerbaijan Wink

Try az-AZ

Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
 
tima26







PostPosted: Mon Aug 25, 2008 2:44 am Reply with quote

I tried But it didn't work. I tried all the variants you said but no results. Please help if you have any other ideas about this.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.20.00 - All Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©