CodeIgniter Forums
Multi Lingual Errors - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29)
+--- Thread: Multi Lingual Errors (/showthread.php?tid=75646)



Multi Lingual Errors - dhefley - 02-29-2020

I'm not 100% sure if this is a feature or a bug or a lack of understanding, but I'm finding when I use custom validation rules with language the messages in the app/Language/en/validation.php file, I can't ever get them to show in other languages.  

It would be nice to be able to forcibly set the locale when getting the error string.  You can do this for the lang function as the third parameter, but I don't know how to do this for the Validation messages.  I know there is a way to use the url to change the locale, but that isn't possible in my scenario.