21489 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 981 Views |
-
translate static $defaults question [SOLVED]

28 January 2010 at 2:45am Last edited: 28 January 2010 6:42am
Hi all,
I'm struggling to find the right way to translate a page's static $defaults array.
I thought I found something with provideI18nEntities(), but although that works with Textcollection and puts the correct translation array in the mysite/lang/en_US.php file, this translation still never shows in the CMS...
Am I missing something? Is there maybe another way to do this?
I'm on 2.3.4
-
Re: translate static $defaults question [SOLVED]

28 January 2010 at 6:38am
Right, got it - sometimes it seems I only ever find things after I posted the question
:
You don't use static $defaults = array(...);
You use the populateDefaults() method instead. Something like
public function populateDefaults(){
parent::populateDefaults();
$this->LastName = _t('MyPage.DEFAULTS_LASTNAME', 'Enter your lastname');
}
| 981 Views | ||
|
Page:
1
|
Go to Top |
