![]() |
form_validation and languages - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: form_validation and languages (/showthread.php?tid=57793) |
form_validation and languages - El Forum - 04-11-2013 [eluser]Uresh Patel[/eluser] Respected, I have implemented many forms with " Code: $this->lang->line('XYZ_label') My site is having multiple language feature.Now i realize that in "config/form-validation.php" ,i have also put many tags.I need to put all this tags as multiple language. Code: <?php I want to do something like above commented lines. please guide me... Thank You, Uresh Patel form_validation and languages - El Forum - 04-11-2013 [eluser]TheFuzzy0ne[/eluser] I might be misunderstanding what you're asking, but what you posted should work: Code: $config = array( form_validation and languages - El Forum - 04-11-2013 [eluser]Uresh Patel[/eluser] [quote author="TheFuzzy0ne" date="1365684299"]I might be misunderstanding what you're asking, but what you posted should work: Code: $config = array( form_validation and languages - El Forum - 04-11-2013 [eluser]TheFuzzy0ne[/eluser] Sorry - I'm an idiot... Code: $config = array( http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html#translatingfn form_validation and languages - El Forum - 04-11-2013 [eluser]Uresh Patel[/eluser] Thank you for reply.... $this->form_validation->set_rules('first_name', 'lang:first_name', 'required'); But, what i am using is like array of rules in form_validation.I am not individually putting "$this->form_validation->set_rules" in all add/edit form methods in controller. Please find attachment...controller and form-validation file...So that you get clear idea. [quote author="TheFuzzy0ne" date="1365685382"]Sorry - I'm an idiot... Code: $config = array( http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html#translatingfn[/quote] form_validation and languages - El Forum - 04-11-2013 [eluser]TheFuzzy0ne[/eluser] Indeed, but it will still work the same way, even if CodeIgniter autoloads your validation rules. form_validation and languages - El Forum - 04-12-2013 [eluser]Uresh Patel[/eluser] [quote author="TheFuzzy0ne" date="1365687803"]Indeed, but it will still work the same way, even if CodeIgniter autoloads your validation rules.[/quote] So, Code: 'academy_blog' => array( form_validation and languages - El Forum - 04-12-2013 [eluser]Uresh Patel[/eluser] [quote author="Uresh Patel" date="1365750053"][quote author="TheFuzzy0ne" date="1365687803"]Indeed, but it will still work the same way, even if CodeIgniter autoloads your validation rules.[/quote] So, Code: array( like on screen..i attached file..... [/quote] Sorry .I found the solution with "TEXT" helper....i use ascii_to_entities() |