23486 Posts in 18995 Topics by 2878 members
|Go to End|
19 August 2009 at 10:34pm
I'm upgrading my old page based on ss 2.2.3 to new 2.3.3 wit new multilang future.
The problem is that I have static typed form in page type ContacPage.php with labels like name surname, subject ...
This problem is common in many cases so I red in doc that there is something like php language tables.
I made in mysite/lang two files pl_PL.php and en_US.php and in contact form:
new TextField(_t('ContactForm.NAMESURNAME', "ImiÄ™ i Nazwisko")
where in pl_PL.php I have :
$lang['pl_PL']['ContactForm']['NAMESURNAME'] = 'foo:';
What I'm doing wrong?
Maybe there is some better way to do same?
20 August 2009 at 12:48am
Hmmm I guess this is more or less the same question as my post: http://www.silverstripe.org/general-questions/show/267119#post267119. Basically, more info and examples on the locale files.
20 August 2009 at 1:15am
Yes we need same functionality:)
20 August 2009 at 2:30am
add this line into your mysite/_config.php file
and then add this to your Page_Controller in mysite/code/Page.php
That should do the trick
20 August 2009 at 4:09am
Donâ€™t know if this solves my problem though. I get a blank page if I add that code to the Page_Controller.
20 August 2009 at 6:20pm
Cool works for me if pasted in PageController::init() method
|Go to Top|