how i can make content languange file load from database |
[eluser]Unknown[/eluser]
such as above topic... i want to make content of language file load from database /application/language/english/global_lang.php Code: <?php table i want to create like: Code: id | indexphp | global_telepon | global_email plzzzz... help me... it's simple for u but not for me... thanks for helping me... ^^
[eluser]yabdab[/eluser]
I was having this same issue and wanted best way to make it work. I have a cloud service and I want to let all my users have the ability to have custom language values if they want. I am also using HMVC setup that also presents a wrinkle. My solution is this, extend the MX_Lang class ( or CI_lang if not using HMVC ). I create an array of custom line values in an array separate from $this->language ( I call mine _language instead ). I rework the line() function to look inside my custom array before returning the translation string. If someone reads this and thinks this is a horrible idea, then please let me know ( and why ). It seems to work OK, but maybe I am missing something? Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); The custom array can come from a cached dump of a database call or from a direct database call. |
Welcome Guest, Not a member yet? Register Sign In |