Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 33 Pomógł: 1 Dołączył: 8.05.2010 Ostrzeżenie: (0%)
|
witam wszystkich
Natrafiłem na pewien problem z tłumaczeniem formularz ich labeli oraz zawartości np selecta, chodzi oczywiscie o klase formularza: sfLoader::loadHelpers(array('I18N')); $sub = array('Wszedzie'=>__('Wszedzie')); $this->setWidgets(array( 'sel' => new sfWidgetFormSelect(array('choices'=> $sub),array('class'=>'sel','id'=>'sell')), )) $this->widgetSchema->setLabels(array( 'username'=>__('Login') )); Podwójny podkreślnik działa w widoku, a jak mam poradzić sobie w formularzu zgóry dzięki za podpowiedz |
|
|
|
![]() |
Post
#2
|
|
|
Grupa: Zarejestrowani Postów: 332 Pomógł: 6 Dołączył: 13.01.2005 Ostrzeżenie: (0%)
|
Cytat Calling the Translation Helper Outside a Template
Not all the text that is displayed in a page comes from templates. That's why you often need to call the __() helper in other parts of your application: actions, filters, model classes, and so on. Listing 13-19 shows how to call the helper in an action by retrieving the current instance of the I18N object through the context singleton. Listing 13-19 - Calling __() in an Action
|
|
|
|
lukasz10 [Symfony] Internationalization i18 form 24.06.2010, 09:13:14
lukasz10 Nie wiem w jaki sposób twoja podpowiedz ma mi pomo... 24.06.2010, 14:09:32
destroyerr Może dlatego, że nie włączyłeś w ogóle i18n, może ... 24.06.2010, 14:52:50
lukasz10 wszystko mam właczone bo mi tłumaczy z widoku, p... 24.06.2010, 15:07:39 ![]() ![]() |
|
Aktualny czas: 25.12.2025 - 15:43 |