Welcome Guest, Not a member yet? Register   Sign In
Using this->lang->load to set validation error messages
#1

[eluser]Bramme[/eluser]
Hi all!

I'm using the validation class, works like a charm, but the site's in Dutch. So I created a dutch folder in my system/language folder and translated email_lang.php.

Next up, in my controller I do
Code:
$this->load->library('validation');
$this->lang->load('email', 'nederlands');

//set rules etc

//in my view file
<?=$this->validation->error_string?>
But the error string is still in English. Am I doing smth wrong, or is it the trick that doesn't work? Would've been handy...
#2

[eluser]xwero[/eluser]
You don't have to load the validation file it will get loaded for you if you change the language in the config file.
#3

[eluser]wiredesignz[/eluser]
You don’t have to load the validation file it will get loaded for you if you change the default language in application/config/config.php

$config['language'] = "english";

:lol:
#4

[eluser]Bramme[/eluser]
[quote author="xwero" date="1213633467"]You don't have to load the validation file it will get loaded for you if you change the language in the config file.[/quote]

God, I knew I was missing smth stupid. Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB