Yii Framework Forum: Translate module - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Translate module Simple module to handle application translations Rate Topic: -----

#21 User is offline   Gustavo 

  • Master Member
  • Yii
  • Group: Moderators
  • Posts: 916
  • Joined: 27-July 10
  • Location:Curitiba - Brasil

Posted 10 April 2012 - 01:00 PM

Hey jowen
you probably missed to import the TranslateModule class, like
    'import'=>array(         'application.modules.translate.TranslateModule'     ),


also, try to turn on debug mode so you can see what is the error
--
Extensions:
translate modue - module to handle translations
multiActiveRecord - db selection in models
redisCache - redis cache component
mpCpanel - interact with cpanel api
mUploadify - use uploadify uploader in your application

Gustavo Salomé Silva
0

#22 User is offline   jowen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 191
  • Joined: 13-July 11
  • Location:Malaysia

Posted 10 April 2012 - 07:03 PM

Hi Gustavo,
'import'=>array(         'application.modules.translate.TranslateModule'     ),


The page still become blank even i add this line inside config/main. Debug mode didn't show anything,just whole pages become blanks.

Seem this line cause my page turn blanks once add this in
'onMissingTranslation' => array('TranslateModule', 'missingTranslation'),
.

Thanks.
0

#23 User is offline   Milind R 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 09-March 12

Posted 27 July 2012 - 07:30 AM

View PostGustavo, on 10 January 2012 - 06:41 AM, said:

Hi Shama
I had the same problem when working with userGroups
It's that to get all application controllers it imports the controllers folder of each module, but doesn't import the components folder, where TranslateBaseController is located.

Gustavo

@Gustavo: Glad to find someone with the same issue

I am currently tinkering with UserGroups and Translate Module to fix this issue, without complete success. I am also using this technique. I'm really confused about the hierarchy of processing of modules, controllers, and components.

1) How do I fix the issue (such that using language-indicating URLs are properly processed, routed and missing translations in the UserGroups module get added (wherever Yii::t has been used there) )?

2) Can you give me some docs/links to understand the differences between and order of execution of the above?
0

#24 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 884
  • Joined: 20-April 11
  • Location:India

Posted 18 October 2012 - 07:15 AM

i want to add that dropdown from my database

how i use?

"The best way would be to use CHtml::listData method passing the languages model as parameter"

where ?

TranslateModule::$acceptedLanguages = CHtml::listData;
TranslateModule::$defaultLanguage = 'en';
TranslateModule::setLanguage('en');

Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#25 User is offline   Arno S 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 27
  • Joined: 16-October 12
  • Location:Zwolle, The Netherlands

Posted 07 February 2013 - 06:08 AM

I stared using this module but I didn't like the dropdown() language selector and wanted links to change the language.
A simple re-work of the dropdown() code.

    /**
     * generates a link for switching to the language specified
     * @param string $string will be handled to CHtml::link, same conditions apply
     * @param string $language should be an acceptable language, validity is not checked
     * @return string
     */
    function setLangLink($string='language link', $language='en')
    {
        Yii::app()->getClientScript()->registerScript(self::ID.'-link-'.$language,'
           $("#'.self::ID.'-link-'.$language.'").on("click", function(){
                $.post(
                    "'.Yii::app()->getController()->createUrl("/translate/translate/set").'",
                    {"'.self::ID.'":"'.$language.'"},
                    function(){window.top.location.reload();}
                );
            });
        ');
        return CHtml::link($string, '#'.$language, array('id '=>self::ID.'-link-'.$language) );
    }

0

#26 User is offline   Sanjeev 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 30-September 12

Posted 26 August 2013 - 08:03 AM

Hi i am newbie in yii,but i want to know is this extension work according to database.
mean's all the data of site change according to my database.If yes then please let me know the whole process.
Thank's
0

#27 User is offline   Yatin Mistry 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 94
  • Joined: 11-March 14
  • Location:Mumbai

Posted 28 July 2014 - 06:40 AM

Need some examples how to use it.

Please share some examples how can we use it in model, view and controller?
Yii Posts

Yes it is 2.0.0.
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • 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