TimeHelper::i18nFormat

2012-05-30 Thread manzapanza
Hi! What is the best way to localize nice dates in cakephp 2?
Should I create the file /app/locale/LC_TIME as recommended in this article 
http://www.bravo-kernel.com/2010/12/using-lc_time-with-cakephp/? 
Thank you!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Translate Behavior Save and Validate more languages

2012-05-08 Thread manzapanza
Some suggestions?
Thanks!

Il giorno lunedì 7 maggio 2012 10:33:41 UTC-3, manzapanza ha scritto:

 I'm trying to Save and Validate categories with 3 translations for the 
 field 'name' using TranslateBehavior. 
 I have a problem with the validation of the field with Translation. 

 Model/Category.php

 public $actsAs = array('Translate' = array('name' = 'MyTranslateName'));
 public $validate = array(
 'name' = array(
 'notempty' = array(
 'rule' = array('notempty'),
 'message' = 'Error notempty',
 ),
 ),
 ...
 );


 View/Categories/admin_edit.ctp:

 echo $this-Form-create('Category');
 echo $this-Form-input('Category.name.deu', array('label' = 
 __d('Category', 'Name Deu')));
 echo $this-Form-input('Category.name.eng', array('label' = 
 __d('Category', 'Name Eng')));
 echo $this-Form-input('Category.name.ita', array('label' = 
 __d('Category', 'Name Ita')));
 echo $this-Form-end(__d('app', 'Submit'));


 In the controller I use simply the save() method and the behavior store 3 
 records correctly in i18n table but the all three values are not validated.
 Is validated only the field of language = $this-Category-locale but in 
 case of a error the error is returned for Category.name field and not for 
 Category.name.eng and for this error messages are not displayed...

 How can I do to validate translations in the same form?

 Thanks!
 Massimo


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Translate behaviour not working as expected

2012-05-07 Thread manzapanza
Hi,
Probably you need to enter manually in i18n table the translations of the 
default language.

TranslateBahavior make an INNER JOIN on i18n table to find translations

Massimo

Il giorno martedì 13 settembre 2011 09:16:36 UTC-3, Gabe ha scritto:

 Hi all, 

 I am using translate behaviour with multiple translate tables and I 
 have configured it according to book.cakephp.org but when there is no 
 translation for an article I get empty strings instead of one of my 
 other translation. 

 I would appreciate any suggestions 
 Gabe

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Potential Database Project using Cake PHP

2012-05-07 Thread manzapanza
http://www.php.net/manual/en/getting-started.php

Il giorno venerdì 4 maggio 2012 00:45:02 UTC-3, Timothy Lau ha scritto:

 I was told that I should use cakePHP for a project involving a database 
 for input from multiple forms.  Can someone start me in the right direction 
 from scratch.  I only know HTML.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: JsHelper CakePHP 2.1

2012-05-07 Thread manzapanza
CakePHP 2.1 natively supports jquery
http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html
What you need to do with JsHelper?

Il giorno giovedì 3 maggio 2012 02:11:28 UTC-3, Charles Blackwell ha 
scritto:

 Are there any tutorials available for the JsHelper for CakePHP 2.1 yet?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Translate Behavior Save and Validate more languages

2012-05-07 Thread manzapanza
I'm trying to Save and Validate categories with 3 translations for the 
field 'name' using TranslateBehavior. 
I have a problem with the validation of the field with Translation. 

Model/Category.php

public $actsAs = array('Translate' = array('name' = 'MyTranslateName'));
 public $validate = array(
 'name' = array(
 'notempty' = array(
 'rule' = array('notempty'),
 'message' = 'Error notempty',
 ),
 ),
 ...
 );


View/Categories/admin_edit.ctp:

echo $this-Form-create('Category');
 echo $this-Form-input('Category.name.deu', array('label' = 
 __d('Category', 'Name Deu')));
 echo $this-Form-input('Category.name.eng', array('label' = 
 __d('Category', 'Name Eng')));
 echo $this-Form-input('Category.name.ita', array('label' = 
 __d('Category', 'Name Ita')));
 echo $this-Form-end(__d('app', 'Submit'));


In the controller I use simply the save() method and the behavior store 3 
records correctly in i18n table but the all three values are not validated.
Is validated only the field of language = $this-Category-locale but in 
case of a error the error is returned for Category.name field and not for 
Category.name.eng and for this error messages are not displayed...

How can I do to validate translations in the same form?

Thanks!
Massimo

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php