Greetings.
Well, sorry if that code doesn't fits well for the unreleased SMW 0.7,
yet, there's maybe a need to someone to have more flexible data format
settings in SMW 0.6...

Here's my patched version of the class and a language file (just one for
English language is attached as an example).
For Russian, there are the following values:
--------------------------
  // smw date/time output formats
  'smw_date_format' => '%d.%m.%Y', // works
  'smw_time_format' => ' %H:%M:%S',
  'smw_fullfate_format' => 'T%H:%M:%S' // untested
--------------------------

Hope it would be useful to someone.
  
As for MW itself, I've made a simple extension to make uselang
variable persistant (passing further via links on the page). That's
useful for multilanguage wikis when the site has to use single
domain name (no interwiki links available). Here's a part of that
extension:
--------------------------
function am_set_uselang($title,$url,$query) {
  global $AM_default_language;
  global $AM_language_code;
  if (!$AM_default_language &&
      strpos($url,"uselang=")===false /*&&
      $title->mNamespace==0 &&
      $title->mInterwiki==""*/) {
    $url.="&uselang=$AM_language_code";
  }
}
$AM_default_language=!isset($_REQUEST['uselang']) || $_REQUEST['uselang'] === 
$wgLanguageCode;
if ($AM_default_language)
  $AM_language_code=$wgLanguageCode;
else
  $AM_language_code=strtolower($_REQUEST['uselang']);
$wgHooks['GetLocalURL'][] = 'am_set_uselang';
// use pretty urls only with apache2handler and when uselang is not required
$wgUsePathInfo=$AM_default_language && $wgUsePathInfo;
--------------------------

Simple, yet seems to work.
Sincerely,
Dmitriy

Attachment: SMW_DT_DateTime.php
Description: Binary data

Attachment: SMW_LanguageEn.php
Description: Binary data

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to