Welcome Guest, Not a member yet? Register   Sign In
problem with 'required' form validation.
#4

[eluser]pgee70[/eluser]
yeah, it was late i worked it out. i have a dual language website, and before i render the html i do a substitute through all the elements of the $lang[] array. i didn't realise that code igniter had its own system elements in this array.
so, i have a helper:

Code:
function lang_sub($str,$obj,$params = '')
{
// substitutes language of a string.
switch ($obj->session->userdata('usr_language'))
{
  case 'am':
   $obj->lang->load('site', 'am');
   break;
  case 'en':
  default:
   $obj->lang->load('site', 'english');
}
foreach ( $obj->lang->language as $key=>$value)
{
  $str = str_replace($key, $value, $str);
}
if (is_array($params))
{
  $str = vsprintf($str,$params);
}
return $str;  
}

and that was causing the problem.


Messages In This Thread
problem with 'required' form validation. - by El Forum - 08-10-2012, 08:52 AM
problem with 'required' form validation. - by El Forum - 08-10-2012, 12:21 PM
problem with 'required' form validation. - by El Forum - 08-10-2012, 12:42 PM
problem with 'required' form validation. - by El Forum - 08-10-2012, 03:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB