Yii Framework Forum: Default Language In Cgridview / Clistview Not Working - Yii Framework Forum

Jump to content

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

Default Language In Cgridview / Clistview Not Working default language in cgridview / clistview not working Rate Topic: -----

#1 User is offline   karim gioca 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 83
  • Joined: 21-September 10

Posted 24 January 2013 - 06:18 AM

Hi everyone,
i set the default language in main.php in french language,
return array(
	.......
	'sourceLanguage'    =>'fr_FR',
        'language'          =>'fr_FR',
        .......
        

it works fine when i use Yii:t() in views, but the cgridview / clistview displays the english language as default language in the summary and pager.

Is there any solution to make those widget take any other language as default language ?
is there any way to force those widget to take other language as default language ?
0

#2 User is offline   MadAnd 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 109
  • Joined: 16-June 11
  • Location:Ukraine

Posted 24 January 2013 - 06:33 AM

Hi,

if you look into Yii's "framework/messages" directory, you might see that there is a directory named "fr" (but not "fr_FR"), which contains French translations for all core/zii messages. Please try to alter your main.php as follows:
	....
		'sourceLanguage' => 'fr',
		'language' => 'fr',
	....


Of course, you should also rename a directory that contains you own messages.
1

#3 User is offline   karim gioca 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 83
  • Joined: 21-September 10

Posted 24 January 2013 - 02:08 PM

View PostMadAnd, on 24 January 2013 - 06:33 AM, said:

Hi,

if you look into Yii's "framework/messages" directory, you might see that there is a directory named "fr" (but not "fr_FR"), which contains French translations for all core/zii messages. Please try to alter your main.php as follows:
	....
		'sourceLanguage' => 'fr',
		'language' => 'fr',
	....


Of course, you should also rename a directory that contains you own messages.


oh yeah it works ! thx very much !
but it's bizzare that works now lol, because i tried that before but didn't work... :huh:
maby when i tried that i didn't include the :
'sourceLanguage'    =>'fr',


Any way tnx again !
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