I'm currently working on a website that can be viewed in 3 different languages. I've put all text into languages files and almost everything is working as expected.
Things like configuration for pagination I've put into a configuration file and into application/config
, like this:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$config['num_links'] = 2;
$config['full_tag_open'] = '<p class="pagination">';
$config['full_tag_close'] = '</p>';
$config['first_link'] = '« ' . lang('first');
$config['last_link'] = lang('last') . ' »';
And it works great, but I've tried the same for my form validation configuration file, like this:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$config = array(
'login' => array(
array(
'field' => 'login_email',
'label' => lang('emailaddress'),
'rules' => 'trim|required|valid_email|min_length[6]'
),
array(
'field' => 'login_password',
'label' => lang('password'),
'rules' => 'trim|required'
),
),
But this doesn't seem to work. It looks like this configuration file gets loaded before the language files/library. And to be honest, at the moment I don't really have an idea how to fix this other than taking everything out of the configuration file again, and put it into the controller, but I'd rather not do this.
Any ideas how to fix this?