• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nesting [extending] of language files

I extended CI_Validation class and it's not possible to do the same with corresponding language file in the same way (i.e. by placing a file which extends basic language data).

I think it should be possible to extend default language files.

Steps to reproduce:
When I place a file with name validation_lang.php into directory system\application\language\english\ this file's content replaces content of original system\language\english\validation_lang.php

Expected result:
First, load system\language\english\validation_lang.php
Second, load system\application\language\english\validation_lang.php if exists

The application directory file doesn't overwrite the system directory file. The application directory file is loaded that is all.
// system/libraries/Language.php snippet
if (file_exists(APPPATH.'language/'.$idiom.'/'.$langfile))
            if (file_exists(BASEPATH.'language/'.$idiom.'/'.$langfile))
So extending the language files isn't part of the framework yet. But here is the feature request with a solution.

Thank you for the solution. I think it must be used in next versions as part of core.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.