Development

Changeset 7943

You must first sign up to be able to contribute.

Changeset 7943

Show
Ignore:
Timestamp:
03/18/08 00:46:09 (5 years ago)
Author:
dwhittle
Message:

1.1: fixed issues when using non file based i18n source

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/i18n/sfI18N.class.php

    r7614 r7943  
    6666 
    6767    $this->dispatcher->connect('user.change_culture', array($this, 'listenToChangeCultureEvent')); 
    68     $this->dispatcher->connect('controller.change_action', array($this, 'listenToChangeActionEvent')); 
     68 
     69    if($this->isMessageSourceFileBased($this->options['source'])) 
     70    { 
     71      $this->dispatcher->connect('controller.change_action', array($this, 'listenToChangeActionEvent')); 
     72    } 
    6973  } 
    7074 
     
    144148    $this->culture = $culture; 
    145149 
     150    // change user locale for formatting, collation, and internal error messages 
     151    setlocale(LC_ALL, $culture.'.utf8'); 
     152 
    146153    if ($this->messageSource) 
    147154    { 
     
    160167    if (!isset($this->messageSource)) 
    161168    { 
    162       $this->setMessageSource($this->configuration->getI18NGlobalDirs(), $this->culture); 
     169      $dirs = ($this->isMessageSourceFileBased($this->options['source'])) ? $this->configuration->getI18NGlobalDirs() : null; 
     170      $this->setMessageSource($dirs, $this->culture); 
    163171    } 
    164172