Translating Field Names |
[eluser]Unknown[/eluser]
Hi everyone! I'm trying to translate the config error of my form. Let say i have an input field 'first_name' I want to apply the validation on it but if there is an error I want it to be output in french. I created this on my french_lang.php file Code: $lang["first_name"]="Le champ Prénom est nécessaire."; The Le champ Prénom est nécessaire. field is required. it nested my translation within the error string. it add my translation into the sentence but I wanted to print only my sentence: Le champ Prénom est nécessaire. I follow the guide http://ellislab.com/codeigniter/user-gui...nslatingfn in my rules I had the lang: to the field that I want the translation Code: //load the french_lang.php on the french folder I did load my language file Also I d'like to know how can I put a custom translation to the min_length?
[eluser]TheFuzzy0ne[/eluser]
./application/language/french/french_lang.php Code: $lang["first_name"] = 'Prénom'; ./application/language/french/form_validation.php Code: $lang['required'] = 'Le champ de %s est nécessaire.'; Apologies for my bad French.
[eluser]Unknown[/eluser]
Thanks a lot for this! Don't worry your french is perfect! |
Welcome Guest, Not a member yet? Register Sign In |