library/Garp/I18n/ModelFactory.php
public function getModel($model) {
        $this->_normalizeModel($model);
        $langSuffix = ucfirst(strtolower($this->_language));
        // Sanity check: is the model already localized?
        if ($this->_modelIsLocalized($model)) {
            throw new Garp_I18n_ModelFactory_Exception_ModelAlreadyLocalized(
                "Looks like model $model is already internationalized."
            );
        }
        $modelName = $model.$langSuffix;
        $model = new $modelName();
        return $model;
    }
public function getModel($model) {
        $this->_normalizeModel($model);
        $langSuffix = ucfirst(strtolower($this->_language));
        // Sanity check: is the model already localized?
        if ($this->_modelIsLocalized($model)) {
            throw new Garp_I18n_ModelFactory_Exception_ModelAlreadyLocalized(
                "Looks like model $model is already internationalized."
            );
        }
        $modelName = $model.$langSuffix;
        $model = new $modelName();
        return $model;
    }
public function getModel ( $ model ) { $ this -> _normalizeModel ( $ model ) ; $ langSuffix = ucfirst ( strtolower ( $ this -> _language ) ) ; // Sanity check: is the model already localized? if ( $ this -> _modelIsLocalized ( $ model ) ) { throw new Garp_I18n_ModelFactory_Exception_ModelAlreadyLocalized ( "Looks like model $model is already internationalized." ) ; } $ modelName = $ model . $ langSuffix ; $ model = new $ modelName ( ) ; return $ model ; }
Load the model
@param Garp_Model_Db|String $model The original model, based on a table.
@return Garp_Model_Db
Load the model