![]() |
Is it possible to translate the error views? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Is it possible to translate the error views? (/showthread.php?tid=81868) |
Is it possible to translate the error views? - includebeer - 05-12-2022 Is it possible to translate the error views in app/Views/errors/html/* ? Like app/Views/errors/html/error_404.php for example? I tried to load a translated string with lang() but it's not working. It looks like at this point the Language class is not loaded because it only shows the key and not the actual translated text. RE: Is it possible to translate the error views? - kenjis - 05-12-2022 I see: Code: Page Not Found Code: --- a/app/Views/errors/html/error_404.php RE: Is it possible to translate the error views? - includebeer - 05-15-2022 That's weird. I tried that but with a custom language file and it didn't show the translated text, only the key name. Now I just tried it on my other computer with the latest version of CI4 (4.1.9) and it works fine with HTTP.pageNotFound and with a custom message. Maybe there's something wrong with my installation on the other computer. Or I'm on a different version of CI4...? RE: Is it possible to translate the error views? - ikesela - 05-15-2022 its work fine for me. try check case sensitive |