Yii Framework Forum: [Extension] Translateable behavior - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Extension] Translateable behavior testers needed Rate Topic: -----

#1 User is offline   kmdm 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 26-May 10

Posted 23 July 2011 - 03:52 PM

Hi all,

STranslateableBehavior is Yii behavior that eases the translation of project models. It automatically creates migrations and stores translated content in same table with language suffix.

See https://github.com/f...leBehavior/wiki for more details.

Download here.

Testers needed!
EximusCommerce e-commerce platform based on yii framework. For now only Russian version available.
yiiadmin autoadmin for yii.
0

#2 User is offline   kmdm 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 26-May 10

Posted 26 July 2011 - 06:51 AM

Anybody?
EximusCommerce e-commerce platform based on yii framework. For now only Russian version available.
yiiadmin autoadmin for yii.
0

#3 User is offline   xenon3000 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 30-July 11

Posted 30 July 2011 - 03:37 PM

View Postkmdm, on 26 July 2011 - 06:51 AM, said:

Anybody?


Hello, i`m the first in answer you :).
I´m interesting in your project, and i am trying to use it in my test code but i am a newbie in yii and is difficult to use for me.

Could you give more detail of how use this extension?

thanks.
0

#4 User is offline   kmdm 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 26-May 10

Posted 31 July 2011 - 01:41 PM

View Postxenon3000, on 30 July 2011 - 03:37 PM, said:

Hello, i`m the first in answer you :).
I´m interesting in your project, and i am trying to use it in my test code but i am a newbie in yii and is difficult to use for me.

Could you give more detail of how use this extension?

thanks.


Thanks. I'll try to make a short video or detailed instructions tomorrow.
EximusCommerce e-commerce platform based on yii framework. For now only Russian version available.
yiiadmin autoadmin for yii.
0

#5 User is offline   Martin Ojaste 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 31-May 11

Posted 03 November 2011 - 05:39 AM

how can i get it to work with giix generated models?
0

#6 User is offline   Byakuya 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 02-May 11

Posted 27 November 2011 - 03:26 PM

Hello, little problem with extension:

Migration doesn't work, but i already have fields like "title", "title_en" in my database. As I realized for the implementation of behavior is sufficient for each field to create a duplicate with the suffix of the language.

I did everything as in instruction, but did not get the expected result.
$t = Page::model()->findByPk(1);
echo $t->text; // returns "123"
Yii::app()->language = 'en';
echo $t->text; // returns the same "123"
echo $t->text_en; // returns right value "456"

0

#7 User is offline   pseu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 20-January 12

Posted 20 January 2012 - 09:47 PM

I'm trying to use this extension, I've defined the behaviours function and the translate one as described in the manual, but when I do ./yiic translate an exception is raised when a new instance of the founded 'translatable' class is created, i.e. at row 97 when this code is called $model = new $class_name;
this is the exception raised:

exception 'CDbException' with message 'CDbConnection failed to open the DB connection: could not find driver' in /var/www/aff/framework/db/CDbConnection.php:382

Stack trace:
#0 /var/www/aff/framework/db/CDbConnection.php(331): CDbConnection->open()
#1 /var/www/aff/framework/db/CDbConnection.php(309): CDbConnection->setActive(true)
#2 /var/www/aff/framework/base/CModule.php(388): CDbConnection->init()
#3 /var/www/aff/framework/base/CApplication.php(431): CModule->getComponent('db')
#4 /var/www/aff/framework/db/ar/CActiveRecord.php(615): CApplication->getDb()
#5 /var/www/aff/framework/db/ar/CActiveRecord.php(2263): CActiveRecord->getDbConnection()
#6 /var/www/aff/framework/db/ar/CActiveRecord.php(379): CActiveRecordMetaData->__construct(Object(Accessory))
#7 /var/www/aff/framework/db/ar/CActiveRecord.php(394): CActiveRecord::model('Accessory')
#8 /var/www/aff/framework/db/ar/CActiveRecord.php(78): CActiveRecord->getMetaData()
#9 /var/www/aff/application/protected/commands/TranslateCommand.php(97): CActiveRecord->__construct()
#10 /var/www/aff/application/protected/commands/TranslateCommand.php(35): TranslateCommand->_loadModelFile('/var/www/aff/...')
#11 /var/www/aff/framework/console/CConsoleCommandRunner.php(65): TranslateCommand->run(Array)
#12 /var/www/aff/framework/console/CConsoleApplication.php(91): CConsoleCommandRunner->run(Array)
#13 /var/www/aff/framework/base/CApplication.php(162): CConsoleApplication->processRequest()
#14 /var/www/aff/framework/yiic.php(33): CApplication->run()
#15 /var/www/aff/application/protected/yiic.php(7): require_once('/var/www/aff/...')
#16 /var/www/aff/application/protected/yiic(4): require_once('/var/www/aff/...')




Normal application database connecting works.
0

#8 User is offline   kmdm 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 26-May 10

Posted 21 January 2012 - 01:02 PM

Hi, have you defined DB connection in console.php?

https://github.com/f...fig/console.php
EximusCommerce e-commerce platform based on yii framework. For now only Russian version available.
yiiadmin autoadmin for yii.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users