Language files sanity check, please - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Language files sanity check, please (/showthread.php?tid=34691) |
Language files sanity check, please - El Forum - 10-06-2010 [eluser]nuwanda[/eluser] I have a form validation language file (form_validation_lang.php) in my application/language dir. Now, is that file supposed to completely override the system/language/form_validation_lang.php file? That's what it appears to be doing. If I use my language file, no language items from the system file are returned, and vice versa. Language files sanity check, please - El Forum - 10-07-2010 [eluser]WanWizard[/eluser] Correct, the are not merged. If you want to 'extend' the language file, include the one in the system directory at the top of your language file. Language files sanity check, please - El Forum - 10-07-2010 [eluser]nuwanda[/eluser] [quote author="WanWizard" date="1286451461"]Correct, the are not merged. If you want to 'extend' the language file, include the one in the system directory at the top of your language file.[/quote] Ah, include it, of course. Thanks. Language files sanity check, please - El Forum - 12-07-2010 [eluser]pyrokinesis[/eluser] Hi guys, I modified the CI_Language class (new MY_Language.php file) to detect if there are 2 language files to be loaded. The system one is loaded by default, the lang file in the application dir is then loaded and added to the system entries. If you add an entry to the file in the application dir it overwrites the default value. It was an easy hack, hope someone finds it useful... Code: /** |