summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 6ef11e345..42ce433c7 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -690,13 +690,22 @@ class CI_Form_validation {
// We look for the prefix lang: to determine this
if (substr($fieldname, 0, 5) == 'lang:')
{
- $label = $this->CI->lang->line(substr($fieldname, 5));
+ $line = substr($fieldname, 5);
+
+ $fieldname = $this->CI->lang->line($line);
// Were we able to translate the field name?
- $fieldname = ($label === FALSE) ? substr($fieldname, 5) : $label;
+ if ($fieldname === FALSE)
+ {
+ return $this->CI->lang->line($line);
+ }
+ else
+ {
+ return $label;
+ }
}
- return $fieldname;
+ return $this->CI->lang->line($fieldname);
}
// --------------------------------------------------------------------